private void init() {
    JPanel content = new JPanel();
    content.setLayout(new BorderLayout());

    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BorderLayout());
    JPanel spacerPanel = new JPanel();
    spacerPanel.setLayout(new GridLayout());
    if (m_allowAdd) {
      JButton addButton = new JButton("Add Colour");
      addButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          String inputValue = JOptionPane
              .showInputDialog("What is the name of the\ncolour you want to add?");
          if (inputValue != null) {
            if (inputValue.trim().length() > 0) {
              try {
                m_props.setProperty(inputValue, Format.colorToHex(JColorChooser
                    .showDialog(getMain(), "Choose a colour...", null)));
              }
              catch (Throwable t) {
                // the colour chooser was most likely
                // canceled, so ignore the exception.
              }
              // redraw the table
              if (m_model != null) {
                m_model.fireTableDataChanged();
              }
            }
          }
        }
      });
      spacerPanel.add(addButton);
    }

    JButton closeButton = new JButton("Close");
    closeButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        doExit();
      }
    });
    spacerPanel.add(closeButton);
    buttonPanel.add(spacerPanel, BorderLayout.EAST);

    content.add(buttonPanel, BorderLayout.SOUTH);

    m_model = new PairTableModel();
    JTable tbl = new JTable(m_model);
    content.add(new JScrollPane(tbl), BorderLayout.CENTER);

    tbl.getColumnModel().getColumn(1).setPreferredWidth(5);
    tbl.getColumnModel().getColumn(1).setCellRenderer(
        new ColourCellRenderer());

    setContentPane(content);
    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        doExit();
      }
    });
  }