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... Components always centered vertically? 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... Components always centered vertically?" Watch "GridBagLayout... Components always centered vertically?" New topic
Author

GridBagLayout... Components always centered vertically?

Shawn Rieger
Greenhorn

Joined: Sep 05, 2005
Posts: 16
I have a panel, in it a few components. I've gotten the components inside the panel to line up just how I want them. But when I add the panel to the frame at location 0,0 (Should be Top Left) its still centered vertically on the frame. Why is this? I just want my components to start out in the top left hand corner of my frame and span out from there. How can I do this. My code is below...

Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: GridBagLayout... Components always centered vertically?
 
Similar Threads
FlowLayout Display Problems
Won't Display
Some More GridBagLayout Help!
Please help me with this grid bag layout!!
GridBagLayout, & addComp() What are the parameters?