如何更改JComboBox的UI [英] How do i change the UI of a JComboBox
本文介绍了如何更改JComboBox的UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我喜欢将JComboBox的UI从默认的金属外观更改为某个自定义UI,请参阅附图。
I like to change the UI of a JComboBox from the default metal look to some custom UI, see attached image.
示例http://i42.tinypic。 com / voxwf7.png
我尝试更改JComboBox的所有UIDefaults但没有成功。
I have tried changing all the UIDefaults for the JComboBox but to no success.
如何实现这一目标?
jdk1.4.2
推荐答案
您必须编写自己的ComboBoxUI类。
我建议看看Synth或Nimbus外观和感觉,以便更轻松。
You have to write your own ComboBoxUI class. I suggest to look at either Synth or Nimbus Look and Feel to make it easier.
这篇关于如何更改JComboBox的UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文