B
Berlin Brown
Normally this stupid GridLayout fills the entire area, now I cant find
the code to do that. I am trying to fill a panel which is 500,400 and
these buttons only fill their respective widths and heights, does it
matter what windowing system I am on for layouts to do different things
or am I missing something, jdk1.4.1.
Ideally, I though _c.fill = BOTH was supposed to fill all the way across?
GridBagConstraints _c = new GridBagConstraints();
_c.anchor = GridBagConstraints.NORTH;
_c.fill = GridBagConstraints.BOTH;
_c.gridwidth = GridBagConstraints.REMAINDER;
saveLabel("Text", _c);
_c.fill = GridBagConstraints.HORIZONTAL;
_c.gridwidth = 3;
saveLabel("The Edit Box", _c);
saveLabel("Submit", _c);
saveLabel("Clear", _c);
// end of the panel
} // end of the function
private void saveLabel(String _val, GridBagConstraints c) {
Button _button = new Button(_val);
_gb.setConstraints(_button, c);
_mainPanel.add(_button);
} // end of the fucntino
the code to do that. I am trying to fill a panel which is 500,400 and
these buttons only fill their respective widths and heights, does it
matter what windowing system I am on for layouts to do different things
or am I missing something, jdk1.4.1.
Ideally, I though _c.fill = BOTH was supposed to fill all the way across?
GridBagConstraints _c = new GridBagConstraints();
_c.anchor = GridBagConstraints.NORTH;
_c.fill = GridBagConstraints.BOTH;
_c.gridwidth = GridBagConstraints.REMAINDER;
saveLabel("Text", _c);
_c.fill = GridBagConstraints.HORIZONTAL;
_c.gridwidth = 3;
saveLabel("The Edit Box", _c);
saveLabel("Submit", _c);
saveLabel("Clear", _c);
// end of the panel
} // end of the function
private void saveLabel(String _val, GridBagConstraints c) {
Button _button = new Button(_val);
_gb.setConstraints(_button, c);
_mainPanel.add(_button);
} // end of the fucntino