2

I'm new here so please forgive me if I do something wrong...

I am using Seaglass Look-and-Feel and it uses JScrollPane in case of large number of items. I would like to change it so that it uses Nimbus look-and-feel JScrollPane instead.

I tried changing ui on JComboBox, however it only changes the "outer" appearance, not the scroll pane itself.

Thank you in advance

EDIT: I tried this, but it changes only the outer appearance (metal ui in this try)...

JComboBox combo = new JComboBox();
    combo.setUI(new MetalComboBoxUI());

EDIT2: Alternatively how can I change all JScrollPanes in project to use nimbus UI and for other components to use some other UI?

  • 1
    better would be send here code to show us what you are tried, isn't clear for me – mKorbel Jun 30 '11 at 07:30
  • hmmm, as I described http://stackoverflow.com/questions/6520803/combining-customized-java-lookandfeel-classes, that's not good idea mixing Look & Feel, but there are exists Custom L&F that allowed mixing Built-in Themes, or you have to create own JComponents, but that isn't easy job :-), but not hard – mKorbel Jun 30 '11 at 09:19

1 Answers1

2

for applied any changes for JComponets UI you have to call

SwingUtilities.updateComponentTreeUI(myFrame);

this post is probably better for your issue

Community
  • 1
  • 1
mKorbel
  • 109,525
  • 20
  • 134
  • 319
  • Hah! I managed to overcome it with a little trick. I extracted source code of look and feel, changed what I needed in scrollpaneUI class, included it in project and it shows scroll pane UI differently now :) – Andrija Sucevic Jun 30 '11 at 12:26