• Post Reply Bookmark Topic Watch Topic
  • New Topic

GridBagContraints.REMINDER  RSS feed

 
Zkr Ryz
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,
could any of you tell me how to use the GridBagContraints.REMINDER
final variable ???
Im trying to put some labels & textfields
and in the end of the JFrame put a JTextArea ocuping the rest of the space aviable, but what do I have to do?, put that value in anchor or fill, fields ???
Thenks in advance.
 
Angela Lamb
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want a component to take up the rest of the space in a column or row, use the fill variable. This will take the values GridBagConstraints.HORIZONTAL, GridBagConstraints.VERTICAL, or GridBagConstraints.BOTH.


If you also want the component to fill up the remaining columns or rows, then set the gridx or gridy variables to GridBagConstraints.REMAINDER.


The anchor variable specifies the position of the component, and doesn't have anything to do with the size.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!