wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes checkbox in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "checkbox in JTable" Watch "checkbox in JTable" New topic
Author

checkbox in JTable

selvas kumars
Ranch Hand

Joined: Jan 06, 2001
Posts: 115
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

Joined: May 28, 2001
Posts: 6
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: checkbox in JTable