|
Java™ by example!
|
|
|
How do I disable a JList element?
Create your custom CellRenderer that takes care of blurring out the disabled items. But beware, you are still able to select them, even though you don't see a proof for this visually. Add a custom SelectionListener and unselect the disabled items that were clicked on. Here's the code:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|