• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting Look and feel for one component type

 
Xander Martin
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I have set my entire application to use the Nimbus look and feel. However, the designer feels the way combo boxes look aren't right, so he wants them reset back to the default look and feel. Anyone ever managed to set the look and feel for one component type?

I've tried the obvious ones of calling getLookfAndFeelDefaults().clone() before setting the nimbus LaF and going through each nimbus default key and setting it to the returned value.


Does change it, but not back to the defaults. I think because it can't find a value, it goes blank and produces some very funky looking ComboBoxes.

I also tried setting ComboBox and ComboBoxUI but to no avail.

Any ideas?

Thanks.
 
Xander Martin
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Calling .setUI() on components and passing a new L&F works nicely. Glad my combo box is a custom component so i just inserted it into the constructor.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!