public SecurityEditDialog(JDialog parent, String title, DBElementListModel listModel, SecurityRecord security) {
        super(parent, title, Dialog.ModalityType.DOCUMENT_MODAL);
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

        //
        // Save the security information
        //
        this.listModel = listModel;
        this.security = security;

        //
        // Create the edit pane
        //
        //    Security Type:   <combo-box>
        //    Security Name:   <text-field>
        //    Ticker Symbol:   <text-field>
        //    Income Payments: <combo-box>
        //    Security Hidden: <check-box>
        //
        JPanel editPane = new JPanel(new GridLayout(0, 2, 5, 5));

        editPane.add(new JLabel("Security Type:", JLabel.RIGHT));
        securityTypeModel = new DBElementTypeComboBoxModel(SecurityRecord.getTypes(),
                                                           SecurityRecord.getTypeStrings());
        securityType = new JComboBox(securityTypeModel);
        if (security != null)
            securityTypeModel.setSelectedItem(SecurityRecord.getTypeString(security.getType()));
        else
            securityTypeModel.setSelectedItem(null);
        editPane.add(securityType);

        editPane.add(new JLabel("Security Name:", JLabel.RIGHT));
        if (security != null)
            securityName = new JTextField(security.getName());
        else
            securityName = new JTextField(15);
        editPane.add(securityName);

        editPane.add(new JLabel("Ticker Symbol:", JLabel.RIGHT));
        if (security != null)
            tickerSymbol = new JTextField(security.getSymbol());
        else
            tickerSymbol = new JTextField(15);
        editPane.add(tickerSymbol);
        
        editPane.add(new JLabel("Income Payments:", JLabel.RIGHT));
        incomePaymentModel = new DBElementTypeComboBoxModel(SecurityRecord.getPaymentTypes(),
                                                            SecurityRecord.getPaymentTypeStrings());
        incomePayment = new JComboBox(incomePaymentModel);
        if (security != null)
            incomePaymentModel.setSelectedItem(SecurityRecord.getPaymentTypeString(security.getPaymentType()));
        else
            incomePaymentModel.setSelectedItem(SecurityRecord.getPaymentTypeString(SecurityRecord.NO_PAYMENTS));
        editPane.add(incomePayment);

        editPane.add(Box.createGlue());
        securityHidden = new JCheckBox("Security Hidden");
        if (security != null)
            securityHidden.setSelected(security.isHidden());
        else
            securityHidden.setSelected(false);
        editPane.add(securityHidden);

        //
        // Create the buttons (OK, Cancel, Help)
        //
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.X_AXIS));

        JButton button = new JButton("OK");
        button.setActionCommand("ok");
        button.addActionListener(this);
        buttonPane.add(button);
        getRootPane().setDefaultButton(button);

        buttonPane.add(Box.createHorizontalStrut(10));
        
        button = new JButton("Cancel");
        button.setActionCommand("cancel");
        button.addActionListener(this);
        buttonPane.add(button);
        
        buttonPane.add(Box.createHorizontalStrut(10));
        
        button = new JButton("Help");
        button.setActionCommand("help");
        button.addActionListener(this);
        buttonPane.add(button);

        //
        // Set up the content pane
        //
        JPanel contentPane = new JPanel();
        contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
        contentPane.setOpaque(true);
        contentPane.setBorder(BorderFactory.createEmptyBorder(30, 30, 30, 30));
        contentPane.add(editPane);
        contentPane.add(Box.createVerticalStrut(15));
        contentPane.add(buttonPane);
        setContentPane(contentPane);
    }