aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JCheckBox and JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JCheckBox and JTable" Watch "JCheckBox and JTable" New topic
Author

JCheckBox and JTable

Nadin Jovan
Greenhorn

Joined: Aug 12, 2003
Posts: 7
Hi,
here is my problem.
I have a JPanel which contains a JCheckBox which is selected by default.
The panel also contains a JTable. Each cell in the table represents a check box too. By default all cells in the table are selected. I need to deselect the JCheckBox if the user deselects one cell in the table. How can I set up an event listener that would do that?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

I would actually do this through the TableModel...

Here's an example :
The TableModel -


The panel that pulls it together -


And a demonstration -


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JCheckBox and JTable