Forums Register Login

Resizing

+Pie Number of slices to send: Send
I have created a panel with two components, one a JTextField, the second a JButton. I have set the size of the panel to be the same height as the JTextField, but when I display the panel, it resizes the Panel to be the height of the JButton. I use GridBag layout.
How do I resize the button so that it has the height and width I want, while keeping the JTextField the same size?
Thanks,
Matt
Are you okay? You look a little big. Maybe this tiny ad will help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1400 times.
Similar Threads
JTextField size too big
How do you make the textfield and button the same size? FlowLayout
GridBagLayout Question: Irregular Spacing
Different cell sizes for jlist cells
Which layout for JTextField
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:19:53.