• Post Reply Bookmark Topic Watch Topic
  • New Topic

GridBagConstraints methods question.

 
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: 2699
10
  • 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
Marshal
Posts: 52580
119
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!