changing the size of a jbutton inside a jtable

Hi,

I have found this example for adding a jbutton to a jtable:

http://forum.java.sun.com/thread.jspa?forumID=57&threadID=715330

however, I have cannot seem to figure out how to set the size of the jbutton. Currently, the jbutton is filled to the size of the cell within the jtable, but i want to have it a bit smaller and centered (the rows of my table are rather large in hieght)

I tried the setSize()

setPrefferedSize()

setMinimumSize()

setMaximumSize()

methods, but nothing seems to work. Has anyone been able to do this?

[584 byte] By [gmonieya] at [2007-11-27 2:53:58]
# 1
Use a JPanel instead of a JButton as cell renderer. Put a button inside the panel - use FlowLayout.
kirillga at 2007-7-12 3:29:21 > top of Java-index,Desktop,Core GUI APIs...