• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a Jbutton inside a Jtable?

 
Alan Blass
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to create a Jbutton inside a Jtable? I have:



but inside the cell it gives me a long text:



the button is not displayed.

Also, how to handle the mouse event when the button is clicked? Any pointers? Thanks
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out how table cell renderers and editors work. In this case I'd read this article by "our own" Rob Camick.
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at Rob Camick's Table Button Column
http://tips4java.wordpress.com/2009/07/12/table-button-column/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!