This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
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

checkbox in JTable  RSS feed

 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI folks,
Any idea of having only checkboxes in a column.The checkboxes must be grouped in the table, so only one will be selected at any time.My requirement will be something like i will be adding a row dynamically,so the checkbox should also fall in that group??How it can be acheived ??
Regards,
silva.
 
Deepal Mehta
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
For getting checkboxes within your table make the first column as new Boolean(true or false) as per the requirement. This will incorporate the checkboxes within the JTable. Now to make the checkbox true is possible but once you keep it inside a group only one checkbox at a time will be true. for that a coding is required inside the mouse click event.
How have you generated rows dynamically within the JTable?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!