Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jbutton inside a jtable wont fire action

 
Giskard Dors
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 Spoor
Sheriff
Pie
Posts: 20510
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was going to suggest Rob's ButtonColumn class but he already linked to it on the other forum.
 
Giskard Dors
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem was my table model...

@Override
public boolean isCellEditable(int row, int column) {
return true;
}

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic