In my java code, I have a table with 3 rows and 7 cells. These all rows has check boxes. Can I write an action for each check box. Is it possible?
Thanks in Advance.
In my java code, I have a table with 3 rows and 7 cells. These all rows has check boxes. Can I write an action for each check box. Is it possible?
Thanks in Advance.
As shown in How to Use Tables: Concepts: Editors and Renderers, Boolean
values in your TableModel
are "rendered with a check box." There's no need for an action listener; the default editor will handle mouse and keyboard events. Numerous examples may be found here and here, e.g.