List of usage examples for javax.swing JEditorPane setDisabledTextColor
@BeanProperty(preferred = true, description = "color used to render disabled text") public void setDisabledTextColor(Color c)
From source file:net.sf.texprinter.utils.UIUtils.java
/** * Format an editor to act as a label. I decided to replace all the * occurrences of multiline JLabel's to JEditorPane's instead, so I * want them to look exactly like ordinary JLabels. * //from w ww.j av a2 s . co m * @param editor The editor to be formatted as a label. */ public static void formatEditorPaneAsLabel(JEditorPane editor) { // disable it editor.setEnabled(false); // make it read only editor.setEditable(false); // transparent editor.setOpaque(false); // set the disabled color as black editor.setDisabledTextColor(Color.BLACK); }