由于我想让这个颜色应用程序更广泛,所以这是最好的方法:
UIManager.put("Combo@R_165_2419@.background", new ColorUIResource(UIManager.getColor("TextField.background")));
UIManager.put("Combo@R_165_2419@.foreground", new ColorUIResource(UIManager.getColor("TextField.foreground")));
UIManager.put("Combo@R_165_2419@.selectionBackground", new ColorUIResource(Color.GREEN));
UIManager.put("Combo@R_165_2419@.selectionForeground", new ColorUIResource(Color.WHITE));
如果要自定义更多(禁用的颜色等),则UIManager属性的此列表可能会很有用:http ://www.rgagnon.com/javadetails/JavaUIDefaults.txt