This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Ok, to set the Open Folder Icon you do the same except, setOpenIcon(new ImageIcon()); and the setClosedIcon(new ImageIcon()) sets the closed folder Icon.
------------------ Happy Coding, Gregg Bolinger
Jeremy Hooie
Ranch Hand
Joined: Aug 22, 2001
Posts: 38
posted
0
I'm setting everything as a DefaultMutableTreeNode. I execute a SQL statement and step through the ResultSet to add each element as a node. Then I create a tree model passing that node to the constructor. Is there a way to change the icon of a node so that I don't have to recode the tree using leafs? Jeremy
Matt Hansen
Ranch Hand
Joined: Jul 31, 2001
Posts: 34
posted
0
You can implement a TreeRenderer and use the getTreeCellRendererComponent to specify the icon of each node.