Hi
If I wish to display a boolean value as checkbox in an enquiry screen how
can I do it?
The problem I have is if I use a JCheckBox it is able to be checked on and
off. But if I setEnabled(false) it appears greyed out which for an enquiry
screen is not wanted.
I have a similar issue with a JList on an enquiry screen
Thanks
Shane

Signature
"If A is success in life, then A equals x plus y plus z. Work is x; y is
play; and z is keeping your mouth shut." -- Albert Einstein
Andrew Thompson - 02 Nov 2004 05:07 GMT
> The problem I have is if I use a JCheckBox it is able to be checked on and
> off. But if I setEnabled(false) ..
setSelected(false)
HTH

Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Aki \ - 02 Nov 2004 11:17 GMT
>>The problem I have is if I use a JCheckBox it is able to be checked on and
>>off. But if I setEnabled(false) ..
>
> setSelected(false)
Or, if you have a boolean variable and want to display its state:
setSelected(booleanVariable);

Signature
-Aki "Sus" Laukkanen
Thomas Weidenfeller - 02 Nov 2004 10:25 GMT
> If I wish to display a boolean value as checkbox in an enquiry screen how
> can I do it?
With a text string (JLabel), and not with a check box.
> The problem I have is if I use a JCheckBox it is able to be checked on and
> off. But if I setEnabled(false) it appears greyed out which for an enquiry
> screen is not wanted.
A check box is not a suitable widget to visualize a boolean condition.
It is an interactive element for allowing the user to express a choice.
/Thomas