File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JTree and look and feel?! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree and look and feel?!" Watch "JTree and look and feel?!" New topic
Author

JTree and look and feel?!

Max Power
Ranch Hand

Joined: May 10, 2004
Posts: 47
hi, i am using a jtree in my application. after changing the look and feel, the tree is not changing its look and feel completely. i already tried tree.updateui() without success. any ideas?

THANKS :-)
Basanth P Rangadhol
Greenhorn

Joined: Nov 22, 2004
Posts: 13
i also encountered similar problem, but then i noticed that i had declared the JTree objectas ststic... i do not know how this helps you.. i have depicted what i encountered!!!.....


Imagination is more important than knowledge - Einstien.
Pritam Barhate
Greenhorn

Joined: Nov 25, 2004
Posts: 15
Here is just a reminder.

Have you called

method?

Here is what Sun's SWING java trail says about changing look and feel after application start up:

Changing the Look and Feel After Startup

You can change the look and feel with setLookAndFeel even after the program's GUI is visible. To make existing components reflect the new look and feel, invoke the SwingUtilities updateComponentTreeUI method once per top-level container. Then you might wish to resize each top-level container to reflect the new sizes of its contained components. For example:

UIManager.setLookAndFeel(lnfName);
SwingUtilities.updateComponentTreeUI(frame);
frame.pack();



May be this helped. If not, atleast I tried.


Pritam Barhate<br />A magic combination of <b>Code</b> & <b>Fire</b> : <a href="http://www.jroller.org/page/codefire/Weblog" target="_blank" rel="nofollow">codefire</a><br />----------------------------------- <br />My Open Source Projects:<br /><a href="https://acemdi.dev.java.net/" target="_blank" rel="nofollow">AceMDI</a>: A easy, yet powerful MDI framework that manages windows as Tabs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTree and look and feel?!