• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

gridbaylayout constraints

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!!



pic.JPG
[Thumbnail for pic.JPG]
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic