JPanel theServerListPanel = new JPanel();
theServerListPanel.setBorder( new TitledBorder( "Servers" ) );
theServerListPanel.setLayout( new BorderLayout() );
layout.setConstraint( theServerListPanel,
new FrameConstraint( 0.0, x,
0.0, 10,
0.0, 200,
0.0, 200 ));
add( theServerListPanel );
theServerListPanel.add( new JScrollPane( serverList ), BorderLayout.CENTER);
JButton addButton = new JButton( "Add" );
addButton.setActionCommand( "addServer" );
addButton.addActionListener( this );
JButton removeButton = new JButton( "Remove" );
removeButton.setActionCommand( "removeServer" );
removeButton.addActionListener( this );
JPanel buttonPanel = new JPanel();
buttonPanel.add( addButton );
buttonPanel.add( removeButton );
buttonPanel.setPreferredSize( new Dimension( 100, 30 ));
theServerListPanel.add( buttonPanel, BorderLayout.SOUTH );
JPanel theServerDetailPanel = new JPanel();
theServerDetailPanel.setBorder( new TitledBorder( "Server Detail" ) );
theServerDetailPanel.setLayout( new BorderLayout() );
editorPanel = new ServerConfigurationPanel();
editorPanel.disableComponents();
theServerDetailPanel.add( editorPanel );
layout.setConstraint( theServerDetailPanel,
new FrameConstraint( 0.0, 220,
0.0, 10,
1.0, -5,
0.0, 200 ));
add( theServerDetailPanel );
JButton cancelButton = new JButton("Cancel");
layout.setConstraint(
cancelButton,
new FrameConstraint(0.5, 5, 1.0, -35, 0.5, 80, 1.0, -10));
cancelButton.setActionCommand("cancelPressed");
cancelButton.addActionListener(this);
cancelButton.grabFocus();
add(cancelButton);
JButton okButton = new JButton("OK");
layout.setConstraint(
okButton,
new FrameConstraint(0.5, -70, 1.0, -35, 0.5, -5, 1.0, -10));
okButton.setActionCommand("okPressed");
okButton.addActionListener(this);
okButton.grabFocus();
add(okButton);