Maintain the Foreground text color in JList[urgent]
posted 14 years ago
Hi, I have a JList with some String elements.When I set setEnabled(false), the text's foreground color becomes dull.How to avoid this dull screen over the JList even after setEnabled(false).Please reply as soon as possible. Happy middling with java. Netharam
It "grays out" the label to show the user that it cannot be selected... normally, this is really something you would really want to do...
But if you don't you'll have to override the default ListCellRenderer...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
posted 13 years ago
Hi. I want to do the same thing but with a JTextField. Can anyone tell me how this is done? By the way, does anyone know a good book that has little tips like these, or is it just common knowledge after working with Java for so long? Thanks for your help!!