问题描述
第一个JComboBox是可编辑的,并且其TitledBorder看起来不错。但是第二个不可编辑的JComboBox看起来很奇怪。 所有JComboBox都包含枚举,因此它们不应是可编辑的,但应具有可编辑JComboBox的漂亮外观。我该如何实现?我正在使用Nimbus。
编辑
也许与我为Nimbus选择的设置有关?这些是设置:
NimbusLookAndFeel nimbus = new NimbusLookAndFeel();
UIManager.setLookAndFeel(nimbus);
UIManager.put("control",Settings.getTexturedBackgroundColor());
UIManager.put("nimbusBlueGrey",Settings.getLightGrayGold());
UIManager.put("nimbusBase",Settings.getDarkGold());
UIManager.put("textForeground",Color.BLACK);
UIManager.put("nimbusFocus",new Color(255,220,35));
UIManager.put("ToolBar:Button.contentMargins",new Insets(5,15,5,15));
UIManager.put("TextField.background",Settings.getLightYellow());
UIManager.put("ComboBox.forceOpaque",false);
UIManager.put("TitledBorder.border",new Insets(10,10,10));
UIManager.put("TitledBorder.position",TitledBorder.ABOVE_BOTTOM);
UIManager.put("TitledBorder.font",getGermanFont(16F));
UIManager.put("TitledBorder.titleColor",Color.GRAY);
UIManager.put("Table.opaque",false);
UIManager.put("List.opaque",false);
UIManager.put("Table.cellRenderer",false);
UIManager.put("OptionPane.buttonFont",Main.getGermanFont(16F));
EDIT2
不,这与Nimbus设置无关:
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)