|
To do so, copy the settings from the enabled state to the disabled state. Be sure to do this in the Event Dispatch Thread (EDT) prior to showing your first window:
UIManager.getLookAndFeelDefaults().put("TextField[Disabled].backgroundPainter", UIManager.getLookAndFeelDefaults().get("TextField[Enabled].backgroundPainter"));
UIManager.getLookAndFeelDefaults().put("TextField[Disabled].borderPainter", UIManager.getLookAndFeelDefaults().get("TextField[Enabled].borderPainter"));
If you are using FormattedTextFields, repeat the above modifying the
strings to say FormattedTextField.
Copyright © 2024 Andrew Oliver