Resize JButtons Using FlowLayout ?

I'm using some images for my Jbuttons and when I use FlowLayout, it sets the buttons dimensions bigger than the images and I can't figure out how to set the dimensions while having FlowLayout set too. They look fine when I use absolute positioning, but I need the flexibility of FlowLayout for different resolutions, etc. Anyonw know how to set the dimensions of a JButton while having FlowLayout set too? Thanks so much!

[430 byte] By [Dave__a] at [2007-11-26 12:57:20]
# 1

As far as I know, FlowLayout doesn't adjust the size of

components at all. Can you post a short, self-contained,

compileable example that shows the offending behavour?

You should be able to do new JButton(myIcon); or

myButton.setIcon(myIcon); and have it Just Work. The button

should resize itself to contain the icon.

es5f2000a at 2007-7-7 16:53:33 > top of Java-index,Desktop,Core GUI APIs...
# 2
setBorder( null );
camickra at 2007-7-7 16:53:33 > top of Java-index,Desktop,Core GUI APIs...
# 3
setBorder(null) worked perfectly. Thanks much!Message was edited by: Dave__
Dave__a at 2007-7-7 16:53:33 > top of Java-index,Desktop,Core GUI APIs...