2013-03-28 24 views

回答

3

你可以use a custom cell renderer for the ComboBox,你可以返回一個JLabel在JComboBox中顯示,而在渲染器的方法中,你可以根據它的值更改特定標籤的字體,在這種情況下,字體名稱將是該值。

+0

[例如](http://stackoverflow.com/questions/5896282/how-to-prevent-jcombobox-from-becoming-unresponsive-when-using-a-custom-listcell) – mKorbel 2013-03-28 06:37:05