• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTree

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im using JTree .The default symbol of the closed and open icon is a circle with a dot in it.I want the explorer look.ie a plus and minus sign.If i use an icon it attatches it after the already existing symbol...
Kindly suggest how can i do it
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pink,
Look at the javax.swing.UIManager. To get the WindowsLookAndFeel you just use the following before you create your tree:
try
{
UIManager.setLookAndFeel( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
}
catch( Exception e ) {};
This will change all components created to WindowsLookAndFeel if you don't want that then you need to perform the exact thing again after your tree is created to get back to whatever look and feel you want. For example:
try
{
UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName() );
}
catch( Exception e ) {};
could be used to get back to the Metal LookAndFeel.
Regards,
Manfred.
 
Pink Stac
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic