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

Using checkboxes with JList  RSS feed

 
Ashwani Singh
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Jlist in my swing application which displays filenames which i need to select and submit for further processing.I can select one or multiple filenames at a time.I want to add check boxes before every file name so that i can select those files by just checking those boxes.I also want to have the priviledge of selecting all the files.How can i implement this.Please help.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recommended reading http://docs.oracle.com/javase/tutorial/uiswing/components/list.html
You will need to provide a custom renderer which behaves like a check box.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!