Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to disable a particular Jliste element?  RSS feed

 
David Chen
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, there:

Is there any easy (straight forward) way to disable one particular element in a JList? So that user can't select it any longer (and meanwhile get it blurred out)?
Checked from internet, it seems that I should create my own ListCellRenderer and SelectionListener as well. Any other easy way to do it?

Highly appreciated if any suggestions

Thanks a lot
David
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say you've mentioned the better way of doing it, but this might be
enough of a workaround

 
David Chen
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Michael for your reply and sample code. It's very helpful.

Thanks a lot again

David
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!