日期:2014-05-20 浏览次数:20717 次
Hashtable<String, String> ht = new Hashtable<String, String>(); ht.put("1", "1"); ht.put("2", "2"); ht.put("3", "3"); JTree jtree = new JTree(ht); pnlMain.add(jtree); jtree.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { System.out.println(e.getNewLeadSelectionPath()); } });