This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes GridBagLayout problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GridBagLayout problem" Watch "GridBagLayout problem" New topic

GridBagLayout problem

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Hi, I've written some code below to add some Buttons and JTextFields to a frame. The submit button is in the wrong place. I would like the submit button to be 2 cells taller, so that it begins at the top of 10 and ends at the bottom of 70, to create a rectangle with the JTextFields.
I've tried several ways but have only been able to do this using empty JPanels (but I don't like this method since it leaves small grey squares on the screen, which show up when you are using a background image).

The code is below, any ideas are appreciated

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
see if this is any closer to what you're trying to do

Consider Paul's rocket mass heater.
subject: GridBagLayout problem
Similar Threads
Layout Problem, Help Me Plz
Implement this constructor
Keyboard layout problem
How to make the window (JPanel?) bigger in gridbaglayout