changing the size of an awt Button

I have added 6 awt Buttons to a GridLayout manager.I want to change the size of these Buttons with the method setSize() but it does not work.I want to keep this GridLayout manager.How can I change the size of these Buttons? 10xMessage was edited by:
[297 byte] By [aditma] at [2007-11-27 0:19:04]
# 1
Try using setPreferredSize().
CaptainMorgan08a at 2007-7-11 22:10:10 > top of Java-index,Java Essentials,Java Programming...
# 2
many many thanks. it works as you proposed.
aditma at 2007-7-11 22:10:10 > top of Java-index,Java Essentials,Java Programming...
# 3
Not all the layout managers respect your component size specifications. For example FlowLayout. You can go through the tutorials and see which layout takes into consideration your size specifications for the components. http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html
qUesT_foR_knOwLeDgea at 2007-7-11 22:10:10 > top of Java-index,Java Essentials,Java Programming...
# 4
thank u
aditma at 2007-7-11 22:10:10 > top of Java-index,Java Essentials,Java Programming...