super(f, "Preferences", true);
JPanel container = new JPanel();
container.setLayout( new BorderLayout() );
JTabbedPane tabs = new JTabbedPane();
JPanel filters = buildFilterPanel();
JPanel conn = buildConnectingPanel();
tabs.addTab( "Filters", null, filters );
tabs.addTab( "Connecting", null, conn );
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout ( new FlowLayout(FlowLayout.RIGHT) );
JButton cancel = new JButton("Cancel");
cancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
CancelPressed();
}});
buttonPanel.add( cancel );
JButton ok = new JButton("OK");
ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
OKPressed();
}});
buttonPanel.add( ok );
getRootPane().setDefaultButton(ok);
container.add(tabs, BorderLayout.CENTER);
container.add(buttonPanel, BorderLayout.SOUTH);
getContentPane().add(container);
pack();
centerDialog();
UIManager.addPropertyChangeListener(new UISwitchListener(container));