This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes gridbaylayout constraints Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "gridbaylayout constraints" Watch "gridbaylayout constraints" New topic
Author

gridbaylayout constraints

Leo Max
Ranch Hand

Joined: Sep 27, 2009
Posts: 36
Hello. i don't understand the explanations of the constraints weightxy, ipadxy, anchor and fill. Gridbaylayout example is the site i'm learning from. There wasn't much luck in google. There were some explanations to these terms but I still don't get it. Can someone write some examples or point me to a site that does have them? I'm looking for examples with numbers and pictures. Or at least Gridbaglayout for dummies kinda explanation

Here's my code. I added the first row of components. the app window was small when it started. When maximizing the window, the textbox was stuck to the button. Setting a frame size didn't help either. When I added the rest of the components, that was no longer the case. i don't know why that happened. Also, max/minimizing the window shouldn't make any wierd looks. It's supposed to resize itself. Now my problem is that size is stuck to date. Why I don't know or how it can be fixed. I've attached a picture to help with visualizing what I'm going after. Oh and the first insets line I added was only supposed to affect the first component. Yet somehow, everything else got pushed to the right. I thought I was going to have to add inset to a few of them but one inset fixed it all :S:S:S

All I got was that the size of the smallest component in the column becomes the size of all the components in that column. And that's when weightxy affects the components? BAAAAH!!!





[Thumbnail for pic.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: gridbaylayout constraints