Two Laptop Bag
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTree and look and feel?!" Watch "JTree and look and feel?!" New topic

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?

Basanth P Rangadhol

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

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

Have you called


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:


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

Pritam Barhate<br />A magic combination of <b>Code</b> & <b>Fire</b> : <a href="" target="_blank" rel="nofollow">codefire</a><br />----------------------------------- <br />My Open Source Projects:<br /><a href="" target="_blank" rel="nofollow">AceMDI</a>: A easy, yet powerful MDI framework that manages windows as Tabs.
I agree. Here's the link:
subject: JTree and look and feel?!
It's not a secret anymore!