msgTypesCB.addItem(HEARTBEAT);
  public ConsoleFontChooser() {    // create a modal dialog    super((java.awt.Frame)null, "Select Font", true);     createLogger();    JPanel panel = new JPanel(new BorderLayout());    // define the gui here    // apply and cancel buttons panel    JPanel buttonPanel = new JPanel();    JButton applyButton = new JButton("Apply");    // when user clicks apply add the selections to the following    // arrays - fontSizes, fontTypes, fontColors    applyButton.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {        int index = msgTypesCB.getSelectedIndex()-1;        if (index <0) return;        if(log.isDebugEnabled()) {          log.debug("index is - " + index +                     "and font style is " + fontStyleCB.getSelectedItem());        }        fontSizes[index]=new Integer((String)fontSizeCB.getSelectedItem()).intValue();        fontTypes[index]=(String)fontStyleCB.getSelectedItem();        fontColors[index]=selectedColor;      }    });    buttonPanel.add(applyButton);    JButton dismissButton = new JButton("Dismiss");    dismissButton.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {        setVisible(false);      }    });    buttonPanel.add(dismissButton);    JButton cancelButton = new JButton("Cancel");    cancelButton.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {        setVisible(false);      }    });    buttonPanel.add(cancelButton);    // Search Panel    JPanel selectPanel = new JPanel();    selectPanel.setLayout(new GridBagLayout());    TitledBorder selectTitledBorder = new TitledBorder("Select Font");    Font selectfont = selectTitledBorder.getTitleFont();    Font selecttitleFont = selectfont.deriveFont(Font.ITALIC);    selectTitledBorder.setTitleFont(selecttitleFont);    selectPanel.setBorder(selectTitledBorder);    JLabel msgTypesLabel = new JLabel("Message Type");    msgTypesCB = new JComboBox();    msgTypesCB.addItem(SELECTONE);    msgTypesCB.addItem(STANDARDOUT);    msgTypesCB.addItem(ERRORMSGS);    msgTypesCB.addItem(HEARTBEAT);    msgTypesCB.addItem(NODECREATION);    msgTypesCB.addItem(CLUSTERADD);    msgTypesCB.addItem(IDLENESS);    msgTypesCB.addItem(NODEDESTROYED);    msgTypesCB.addItem(SEARCH);    msgTypesCB.addItem(NOTIFY);    JLabel fontSizeLabel = new JLabel("Font Size");    fontSizeCB = new JComboBox(FONTSIZE);    fontSizeCB.setSelectedIndex(4);    JLabel fontStyleLabel = new JLabel("Font Style");    fontStyleCB = new JComboBox(FONTS);    // Color choser    JLabel colorLabel = new JLabel("Font Color");    colorButton = new JButton();    colorButton.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {      selectedColor = JColorChooser.showDialog(null, "Please Chose a Font Color", null);      colorButton.setBackground(selectedColor);      }    });    int x = 0;    int y = 0;    selectPanel.add(msgTypesLabel,		   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 5, 5, 5), 0, 0));    selectPanel.add(msgTypesCB,		   new GridBagConstraints(x, y++, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 0, 5, 5), 0, 0));    x=0;    selectPanel.add(fontSizeLabel,		   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 5, 5, 5), 0, 0));    selectPanel.add(fontSizeCB,		   new GridBagConstraints(x, y++, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 0, 5, 5), 0, 0));    x=0;    selectPanel.add(fontStyleLabel,		   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 5, 5, 5), 0, 0));    selectPanel.add(fontStyleCB,		   new GridBagConstraints(x, y++, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 0, 5, 5), 0, 0));    x=0;    selectPanel.add(colorLabel,		   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 5, 5, 5), 0, 0));    selectPanel.add(colorButton,		   new GridBagConstraints(x, y++, 1, 1, 0.0, 0.0,					  GridBagConstraints.WEST,					  GridBagConstraints.HORIZONTAL,					  new Insets(10, 0, 5, 5), 0, 0));    panel.add(buttonPanel, BorderLayout.SOUTH);    panel.add(selectPanel, BorderLayout.CENTER);    getContentPane().add(panel);    pack();  }