I want to set the inactive background color of a JTextField on a per-component basis. (The inactive colors are shown when calling setEditable(false)
).
Calling
UIManager.put("TextField.inactiveBackground", new ColorUIResource(Color.YELLOW));
sets the inactive color application-wide.
It can be done under Nimbus LAF like documented here: http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/nimbus/package-summary.html. Can a similar thing be done when using Windows LAF?