Different behaviour of Jcomponet's setEnable() method is required
Hi all,
I want JcheckBoxes and JradioButtons in following way
1) which are not allowed to select or de-select
2) with labels in black colour
i used jComponent's setEnabled(false) method which only satisfy the first rule i have mensioned above. Labels are shown in grey colour.
Is there any other way to do this rather than extending jcheckBox and jRadioButton and override above method?
Thanks and regards!!!
[455 byte] By [
ibmnewa] at [2007-10-3 6:08:42]

Hi dhinakaran,Thanks a lot for ur reply. But still I have a problem, the radion button's label is a variable which is set dynamically. In that case how can I set the radio button's text within html tags? Thanks a lot again,plz reply soon.
It is the responsibility of the UI object to render the component, so ideally you should replace that with one you have overridden (see BasicButtonUI.painttext(), which is the method that paints greyed out text when disabled).
Are you sure that's what you want, though? If I saw a checkbox with black text I'd expect it to work and would get a bit annoyed if it didn't.