A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
Swing / AWT / SWT
is it possible to allow only one check among all checkbox in JTable
Joined: Sep 30, 2013
Sep 30, 2013 07:59:23
i did a jTable out and in it i have this column which is boolean type, this column display the checkbox.
user can only enable to check one of the checkbox in many rows from the jTable
What i have so far:
user can check multiple check box
Hope someone can clear my doubt as soon as possible
Joined: Sep 13, 2007
Sep 30, 2013 08:34:19
Checkboxes are meant for multiple selection. For single selection better to use radio buttons.
Joined: Jul 26, 2007
Sep 30, 2013 22:44:06
Welcome to the Ranch.
You can override the setValueAt method and deselect existing choice (setting the value to false) before setting the new value to true.
How to ask questions
Donate a pint, save a life!
Onff-turn it on!
subject: is it possible to allow only one check among all checkbox in JTable
Freeze Pane in JTable
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014