how to change icons for roothandes
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aparna_Chaturvedi
Posted On:   Thursday, July 12, 2001 07:19 AM

In java Look&Feel we get default icons for roothandles which look something like a key.How can i cange those default icons to + and _ iconslike in Sytem Look&Feel.I need to use Java Look and Feel only not system look and feel

Re: how to change icons for roothandes

Posted By:   Anonymous  
Posted On:   Friday, July 13, 2001 08:43 AM

Assuming you already have those + and - icons -- or you can download them from http://jfa.javalobby.org/projects/icons/allicons.html -- you can change the default tree icons by:

ImageIcon treePlusIcon = new ImageIcon( "TreePlus.gif" );
ImageIcon treeMinusIcon = new ImageIcon( "TreeMinus.gif" );
UIManager.put( "Tree.collapsedIcon", treePlusIcon );
UIManager.put( "Tree.expandedIcon", treeMinusIcon );

Cheers

Tue
About | Sitemap | Contact