-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,107
  • 18
  • 130
  • 305
JhonF
  • 189
  • 2
  • 2
  • 6

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
  • 200,320
  • 28
  • 229
  • 974