File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JCheckBox and JTable

 
Nadin Jovan
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would actually do this through the TableModel...

Here's an example :
The TableModel -


The panel that pulls it together -


And a demonstration -
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic