[Advanced-java] Readonly property for JCheckBox and JRadioButton
Westland, M.A.P. (Michiel)
mwestland at vda.nl
Mon Apr 14 16:32:20 2003
Hi,
JTextField has a readonly property:
nameTextField.setReadonly(true);
This means the background of the field becomes
gray, while the text remains black and the user
can still select text, but cannot modify.
JCheckBox and JRadioButton do not have such a
property, but I need it.
I do not want to use the enabled property
because the component label/text becomes
darkgray.
Do you know a way to create a readonly
JCheckBox or JRadioButton, or does anyone
know how to change the textcolor and bullet-
color of a disabled component to black.
Thank you very much!
Michiel Westland