title: JFrame appears empty and minimised
body: <p>I am trying to write a small GUI program that consist of one <code>JComboBox</code> that has to paint the <code>ContentPane</code> with a color chosen from the combobox.</p>
  
  <p>I do not know why it doesn't work as it is supposed to. When I start my main method it produces an empty JFrame even without the comboBox, which I know that I had added to the JFrame.</p>
  
  <p>This is my main method:</p>
  
  <pre><code>import javax.swing.JFrame;
  public class TestRGBComboBox {
  public static void main(String[] args) {
      JFrame frame = new RgbComboBoxFrame();
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
      }
  }
  </code></pre>
  
  <p>this is my JFrame class</p>
  
  <pre><code>public class RgbComboBoxFrame extends JFrame{
     private static final int FRAME_WIDTH = 300;
     private static final int FRAME_HEIGHT = 300;
     private JComboBox colorComboBox;
     private ActionListener listener;
  
  public void RgbComboBoxFrame() {
  
      colorComboBox = new JComboBox();
      colorComboBox.addItem("RED");
      colorComboBox.addItem("GREEN");
      colorComboBox.addItem("BLUE");
      colorComboBox.setEditable(true);
      listener = new AddListener();
      paintContentPane();
      createPanel();
      setSize(FRAME_WIDTH,FRAME_HEIGHT);
  }
  class AddListener implements ActionListener{
      public void actionPerformed(ActionEvent event){
          paintContentPane();
      }
  }
  
  private void paintContentPane(){
      Color c = (Color)colorComboBox.getSelectedItem();
  
      getContentPane().setBackground(c);
  }
  private void createPanel(){
      JPanel controlPanel = new JPanel();
      colorComboBox.addActionListener(listener);
      controlPanel.add(colorComboBox);
      add(controlPanel,BorderLayout.SOUTH);
  }
  }
  </code></pre>