aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to disable a particular Jliste element? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to disable a particular Jliste element?" Watch "How to disable a particular Jliste element?" New topic
Author

How to disable a particular Jliste element?

David Chen
Ranch Hand

Joined: Jan 06, 2002
Posts: 57
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

Joined: Jun 09, 2003
Posts: 4632
I'd say you've mentioned the better way of doing it, but this might be
enough of a workaround

David Chen
Ranch Hand

Joined: Jan 06, 2002
Posts: 57
Thank you very much Michael for your reply and sample code. It's very helpful.

Thanks a lot again

David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to disable a particular Jliste element?
 
Similar Threads
HTML select tag disabling particular elements?
Best way to search for an element in integer array
Disableing Spell checking
how to disable the dialog " Press ok to send data ..."
richfaces Autocomplete off in a form