This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
swing:jtree_demo_01 [2015/05/17 16:56] gthanos |
swing:jtree_demo_01 [2016/02/26 11:15] (current) |
||
|---|---|---|---|
| Line 37: | Line 37: | ||
| public class TreeDemo extends JPanel | public class TreeDemo extends JPanel | ||
| - | implements TreeSelectionListener, TreeModelListener { | + | implements TreeSelectionListener { |
| private JEditorPane htmlPane; | private JEditorPane htmlPane; | ||
| private JTree tree; | private JTree tree; | ||
| Line 117: | Line 117: | ||
| System.out.println(nodeInfo.toString()); | System.out.println(nodeInfo.toString()); | ||
| } | } | ||
| - | } | ||
| - | | ||
| - | public void treeNodesChanged(TreeModelEvent e){ | ||
| - | System.out.println("Node changed\n"); | ||
| - | } | ||
| - | public void treeNodesInserted(TreeModelEvent e){ | ||
| - | System.out.println("Node inserted\n"); | ||
| - | } | ||
| - | public void treeNodesRemoved(TreeModelEvent e){ | ||
| - | System.out.println("Node deleted\n"); | ||
| - | } | ||
| - | public void treeStructureChanged(TreeModelEvent e){ | ||
| - | System.out.println("Tree structure changed\n"); | ||
| } | } | ||