J jinnifer Unregistered / Unconfirmed GUEST, unregistred user! 2003-05-31 #1 我急用JAVA写的树形控件,谁有呀?我已找了好久了! bill.robin@263.net
S Sterntaler Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-04 #3 javax.swing.JTree 不行吗?JDK 就有。
S Sterntaler Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-04 #4 import javax.swing.*; // ... DefaultMutableTreeNode root; root = new DefaultMutableTreeNode("Root"); root.add(new DefaultMutableTreeNode("Child1"); root.add(new DefaultMutableTreeNode("Child2"); JTree tree = new JTree(root); 然后把 tree 添加到容器上就可以。
import javax.swing.*; // ... DefaultMutableTreeNode root; root = new DefaultMutableTreeNode("Root"); root.add(new DefaultMutableTreeNode("Child1"); root.add(new DefaultMutableTreeNode("Child2"); JTree tree = new JTree(root); 然后把 tree 添加到容器上就可以。