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

setSelectionMode?  RSS feed

 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I just have a simple question about :
myList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

I can select many choices even I dont have this sentence above.
Does that line have a special meaning?
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

By default the JList selection model allows any combination of items to be selected at a time, using the constant MULTIPLE_INTERVAL_SELECTION.

Java API Documentation: javax.swing.JList
 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh ok..thank you Joe!


i got another problem :

am i doing something wrong?
cause it wont work...
i am new to Jlist .. :/
 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just found out that "ListModel" didnt have the method "addElement"..
how can i add stuffs into it then?
 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nevermind...
the newbie just found out
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!