Frage

Let's say you have a JCheckBox you want to use as an on/off indicator. You use setEnabled(false) to disable mouse clicks on the JCheckBox. But setEnabled(false) also grays out the checkBox and the checkBox's text. Is there a way to customise setEnabled(false) so that the graying out does not happen?

If that's not possible, is the only solution something along the lines of customising a ButtonModel?

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top