Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTree and look and feel?!

 
Max Power
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!!.....
 
Pritam Barhate
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic