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.
posted 16 years ago
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.