2 * Utility class so I don't have to think about GridBagLayout
8 public class PairPanel extends JPanel {
9 GridBagLayout gbLayout;
10 GridBagConstraints gbLeft, gbRight;
16 PairPanel( int x, int y ) {
20 i = new Insets( x, y, x, y );
22 setLayout( gbLayout = new GridBagLayout() );
24 gbLeft = new GridBagConstraints();
30 gbLeft.anchor = GridBagConstraints.EAST;
32 gbRight = new GridBagConstraints();
37 gbRight.gridwidth = GridBagConstraints.REMAINDER;
38 gbRight.anchor = GridBagConstraints.WEST;
41 public void addLeft( Component c ) {
42 gbLayout.setConstraints( c, gbLeft );
46 public void addRight( Component c ) {
47 gbLayout.setConstraints( c, gbRight );