Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with JList selection modes

 
Robert Miller
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic