This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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
subject: JButton in JTable
jQuery in Action, 3rd edition