| Author |
Jbutton inside a jtable wont fire action
|
Giskard Dors
Greenhorn
Joined: Jul 18, 2011
Posts: 2
|
|
Hi guys I have a big problem...Im trying to fire an action for a button inside a table, the problem....the button wont fire anything....
I just copyed a jtable button example and adapted it to my model.
I hope you can help me guys, thanks a lot!
the editor
the renderer
And this is the simple code:
Like I said, the button is showing, but the action isnt working at all...
when I try the code without my model it works just fine...maybe something is missing to my model, I dont know...
this is my model
|
 |
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1791
|
|
Cross posted: http://www.java-forums.org/awt-swing/46599-jbutton-inside-jtable-wont-fire-action.html
Be Forthright When Cross Posting To Other Sites
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
I was going to suggest Rob's ButtonColumn class but he already linked to it on the other forum.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Giskard Dors
Greenhorn
Joined: Jul 18, 2011
Posts: 2
|
|
The problem was my table model...
@Override
public boolean isCellEditable(int row, int column) {
return true;
}
Thanks
|
 |
 |
|
|
subject: Jbutton inside a jtable wont fire action
|
|
|