File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Need help with JList selection modes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need help with JList selection modes" Watch "Need help with JList selection modes" New topic
Author

Need help with JList selection modes

Robert Miller
Ranch Hand

Joined: Jun 18, 2004
Posts: 56
I have an application using a JList and I want to implement the additional restriction that as long as the list is non-empty there will always be one element selected. I am using the SINGLE_SELECTION model but that allows the user to deselect the current item and leave no elements selected. I suspect I can accomplish what I want using a ListSelectionListener but I haven't found enough documentation on that object for me to determine whether it would be helpful.

Is there anyone out there who can help me out with this?

Thanks!

Robert
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help with JList selection modes
 
Similar Threads
JTable Spread Sheet
getting result in textfield using jlist
JList setListData problem
programmatic change of text item color in JLIst
JScrollPane - More than One Component