开发者

Changing JScrollPane on JComboboxBox

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)...

JComboB开发者_如何学编程ox 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?


for applied any changes for JComponets UI you have to call

SwingUtilities.updateComponentTreeUI(myFrame);

this post is probably better for your issue

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜