my dog learned polymorphism
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes JButton in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "JButton in JTable" Watch "JButton in JTable" New topic

JButton in JTable

Sven Mari�n

Joined: Oct 13, 2004
Posts: 11
Hi guys,

Does any of you know how I can put a clickable JButton in a JTable ? I succeed in adding the JButton as a CellRenderer in my JTable, but it doesn't seem to react to ActionEvents...

Sven Mari�n<br />SCJP, SCBCD, SCJD (in progress)
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I think it is a good idea to try and figure out how to add a JButton to a Jtable as a way for you to learn. However, it isn't really necessary for you to do this for the assignment. So if you get frustrated and can't figure it out, don't feel bad.

Where do you add the ActionListener code?


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: JButton in JTable
It's not a secret anymore!