This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jbutton inside a jtable wont fire action  RSS feed

 
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

 
Sheriff
Posts: 21330
87
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
 
Your mind is under my control .... your will is now mine .... read this tiny ad
free 1 hour java lesson
https://coderanch.com/t/695988/free-hour-java-lesson
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!