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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GridBagLayout " Watch "GridBagLayout " New topic
Author

GridBagLayout

Orna Vel
Greenhorn

Joined: Jun 02, 2003
Posts: 12
Hello,
I have a problem, and have no idea what to try next.
I use GridBagLayout to place my Components in appropriate places on the screen. The problem is that when I call my code the first time it appears in totally different size on the screen, and takes it's right place just after the first resizing or maximizing/minimizing the whole window.
I know that the problem is in controlPanel, which has a lot of buttons. When I replace it with another "dummy" panel, the picture appears to be ok. But how I can make my code running properly anyway?

I tried: setVisible(false) - setVisivle(true) - does not help much.


Here is my code:



where


Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: GridBagLayout
 
Similar Threads
GridBagLayout/JScrollPane Bug Explained- Is there a workaround?
how to align components in GridBagLayout in JAVA swing
Need help with this code
Reuse of GridBagConstraints
GridBagLayout