Is it possible to include JButton in a JTable?

Posted by Benjamin Confino on Stack Overflow See other posts from Stack Overflow or by Benjamin Confino
Published on 2009-04-18T22:59:38Z Indexed on 2010/06/02 1:33 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

I have a JTable that stores the results of a database query, so far so good. What I want is for the last column in each table to have a clickible JButton that will open the edit screen for the object represented in that row, and that means the button will need to know the details of the first column in the table from its own row (the ID from the database).

Any advice? I already tried just adding JButtons but they turned into Text when I tried to run it.

© Stack Overflow or respective owner

Related posts about java

Related posts about swing