Changing the Button Size

I am using four buttons in my application. I want to set the same size for all the four button . how can i do that. Because i am getting different size for all that four buttons. that make my application look absurd.
[223 byte] By [chhapoliaa] at [2007-11-26 18:53:08]
# 1
read the API for JButton
CarrieHunta at 2007-7-9 6:27:09 > top of Java-index,Core,Core APIs...
# 2
This is perhaps more complicated than you might think. So posting it in the correct forum (Swing) instead of a completely irrelevant forum (this one) would be a good way to start.
DrClapa at 2007-7-9 6:27:09 > top of Java-index,Core,Core APIs...
# 3
I was thinking that the OP would see the API and find the setSize() call. :-) Didn't seem all that complicated to me.
CarrieHunta at 2007-7-9 6:27:09 > top of Java-index,Core,Core APIs...
# 4
DrClap can you just go to the thread message id9509159
karsa at 2007-7-9 6:27:09 > top of Java-index,Core,Core APIs...
# 5

> I was thinking that the OP would see the API and find

> the setSize() call. :-) Didn't seem all that

> complicated to me.

The complicated part is choosing the size in the first place. Sure, you can just arbitrarily choose a size, but it would be preferable to have some kind of layout manager that made the buttons all the same size in a nice way, even if the user resized the application.

DrClapa at 2007-7-9 6:27:09 > top of Java-index,Core,Core APIs...
# 6
i wasn't going to assume that the OP wants the buttons to resize when the window resizes. actually, i don't know of any apps that do that. why would anyone want to do that?!
CarrieHunta at 2007-7-9 6:27:09 > top of Java-index,Core,Core APIs...
# 7
Mine do. When you shrink the window small enough then the buttons shrink too. It's not that I wanted to do that, it's that the layout manager naturally does that.
DrClapa at 2007-7-9 6:27:09 > top of Java-index,Core,Core APIs...