开发者

Changing JScrollPane on JComboboxBox

开发者 https://www.devze.com 2023-03-16 15:35 出处:网络
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 Nim

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

精彩评论

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

关注公众号