Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem using DefaultTreeCellRenderer  RSS feed

 
claude jones
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am trying to set a JTree to have a window's look and feel. Using the following:

However, when I add the following code to remove the leafIcon, the look and feel changes to the Java Look and Feel.

If I remove the code above the application uses the window's look and feel. Any ideas of what I need to do to maintain a consistent window's look and feel.

Below is the complete code:


[This message has been edited by claude jones (edited December 19, 2001).]
 
claude jones
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the same problem with the look and feel changing from window's to Java when I create my own custom renderer:

Any ideas?
 
claude jones
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed my problem. I have to set the look and feel before I start adding components to my JFrame.
Thanks.
cj
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!