Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GridBagConstraints methods question.  RSS feed

 
Anton Sotnikov
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone!
Well i started learning of swing through the GridBagLayout and this object GridBagConstraint();
But i didn't understand meanings of following methods:
1. gs.weightx ???

gs.weighty ???

2. gs.fill = GridBagConstraints.; ???

3.gs.anchor = GridBagConstraints.; ???

4.gs.insets = new Insets(arg, arg arg, arg); ???

Please if you have aware about it - to do more explanations for me here?
or if it possible in some scheme.
Thank you!
with regards.
 
Rob Camick
Ranch Hand
Posts: 2752
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start by reading the section from the Swing tutorial on How to Use GridBagLayout for an explanation of all the constraints.
 
Campbell Ritchie
Sheriff
Posts: 53734
127
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is often easier to use a class like Cay Horstmann's GBC class than plain simple GridBagConstraints.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!