Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

multile selection in JList  RSS feed

 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to make mutiple selection in JList?.please help me out.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use the setSelectionMode method of the list:
setSelectionMode(int mode)
where mode can equal:
SINGLE_SELECTION (default),
SINGLE_INTERVAL_SELECTION, or
MULTIPLE_INTERNAL_SELECTION
Manfred.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!