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 fields not formatted correctly 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 "fields not formatted correctly" Watch "fields not formatted correctly" New topic
Author

fields not formatted correctly

Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
So, I've got this window that contains a number of text fields. My problem is that when I run it the fields are all squashed and I can't enter any text in them, it looks almost as if they are set to a size of zero, which they aren't. I'm using a GridBagLayout and I can't figure whats wrong with it, I know it must be something in those settings that is messing this up. Any ideas?


Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Add this line to the end of the "init" method.
Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
I get the following:

java.awt.Dimension[width=609,height=402]

Does that mean the preferred size of the window? I tried changing it to that and it doesn't fix the field size problem and not everything fits into the window.
Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
Ahh, now I see the problem. One of my fields was set to a high size, thus screwing up the size of the other fields because the size of the window was too small.
 
Don't get me started about those stupid light bulbs.
 
subject: fields not formatted correctly
 
Similar Threads
Not writing to new file...
file renaming...
Button click - String operation
text box - GridBagLayout
retrieving and storing password from and to hashtable