-1

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.

mKorbel
  • 109,525
  • 20
  • 134
  • 319
JhonF
  • 199
  • 2
  • 2
  • 7

1 Answers1

1

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.

image

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045