private void init(Component c, AttributeSet initial) {
    m_app = (JWP) c;
    
    JPanel main = new JPanel();
    JPanel buttonPanel = new JPanel();
    JPanel listPanel = new JPanel();
    JPanel fontPanel = new JPanel();
    JPanel optionPanel = new JPanel();
    JPanel previewPanel = new JPanel();
    main.setLayout(new BorderLayout());
    buttonPanel.setLayout(new FlowLayout());
    fontPanel.setLayout(new BorderLayout());
    optionPanel.setLayout(new GridLayout(3, 2));

    Registry reg = m_app.getRegistry();
    Enumeration fontEnum = reg.getKeys("FONTS");
    Vector fonts = new Vector();
    while (fontEnum.hasMoreElements()) {
      String fontKey = (String) fontEnum.nextElement();
      if (reg.getBoolean("FONTS", fontKey)) {
        fonts.add(fontKey);
      }
    }
    
    m_fontList = new JList(fonts);
    m_fontList.addListSelectionListener(this);
    
    JScrollPane scroller = new JScrollPane(m_fontList);
    listPanel.add(scroller);

    fontPanel.add(listPanel, BorderLayout.WEST);
    fontPanel.add(optionPanel, BorderLayout.EAST);
    
    int[] sizes = m_app.getFontSizes();
    m_sizeBox = new JComboBox();
    for (int k = 0; k < sizes.length; k++) {
      m_sizeBox.addItem(Integer.toString(sizes[k]));
    }
    m_sizeBox.setEditable(false);
    m_sizeBox.addItemListener(this);

    optionPanel.add(m_sizeBox);
    optionPanel.add(new JSeparator());
    m_boldBox = new JCheckBox("Bold", false);
    m_boldBox.addItemListener(this);
    m_italicBox = new JCheckBox("Italic", false);
    m_italicBox.addItemListener(this);
    m_plainBox = new JCheckBox("Regular", false);
    m_plainBox.addItemListener(this);
    
    boolean bold = StyleConstants.isBold(initial);
    boolean italic = StyleConstants.isItalic(initial);
    if (!(bold || italic)) {
      m_plainBox.setSelected(true);
      m_plainBox.setEnabled(true);
      m_boldBox.setEnabled(false);
      m_italicBox.setEnabled(false);
    }
    else {
      if (bold) {
        m_boldBox.setSelected(true);
      }
      if (italic) {
        m_italicBox.setSelected(true);
      }
      m_plainBox.setEnabled(false);
      m_boldBox.setEnabled(true);
      m_italicBox.setEnabled(true);
    }
    String fontSize = Integer.toString(StyleConstants.getFontSize(initial));
    m_sizeBox.setSelectedItem(fontSize);
    String fontFamily = StyleConstants.getFontFamily(initial);
    m_fontList.setSelectedValue(fontFamily, true);
    
    optionPanel.add(m_plainBox);
    optionPanel.add(m_italicBox);
    optionPanel.add(m_boldBox);

    // Button Pane
    JButton okButton = new JButton("OK");
    okButton.setActionCommand("ok-button");
    okButton.addActionListener(this);
    JButton cancelButton = new JButton("Cancel");
    cancelButton.setActionCommand("can-button");
    cancelButton.addActionListener(this);
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);

    // Preview Pane
    m_prevArea = new JTextArea("The Quick Brown Fox...");
    m_prevArea.setSize(200, 200);
    m_prevArea.setEditable(false);
    previewPanel.add(m_prevArea);
    paintPreviewArea(true);

    // Add Stuff to Main
    main.add(fontPanel, BorderLayout.NORTH);
    main.add(previewPanel, BorderLayout.CENTER);
    main.add(buttonPanel, BorderLayout.SOUTH);

    getContentPane().add(main);
    pack();
    // set the position of the dialog.
    setLocationRelativeTo(c);
  }