title: Combo box entries are not showing on the frame
body: <p>i have a problem with combo box.
  my entry not showing on the drop down list for some reason. I tried with 2 methods and non of them are working. Combo box appearing in the frame, but it's empty. I don't see where is the problem, and compilation not returning any errors.</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  
  public class TemplatesList extends JComboBox&lt;String&gt;
  {
      public JComboBox faceCombo;
      private String[] lista = {"change", "handover"};
      private JComboBox wyobr = new JComboBox();
  
  
      public TemplatesList()
      {
      /*
          faceCombo = new JComboBox();
          faceCombo.setEditable(false);
          faceCombo.addItem("change request");
          faceCombo.addItem("emergancy change request");
          faceCombo.addItem("problem request");
          faceCombo.addItem("problem handover");
          faceCombo.addItem("Major Incident handover");
   */
  for (int i=0; i &lt; lista.length; i++)
  {
      wyobr.addItem(lista[i]);
  }
      }
  }`enter code here`
  </code></pre>
  
  <p>main class</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  import javax.swing.JList;
  
  public class ChoosingPage
  {
  static JFrame frame;
  JLabel choose;
  
  public ChoosingPage ()
  {
      frame = new JFrame ("Primark's templates");
      frame.setSize(400,400);
      frame.setLocation(50,50);
     // frame.setLayout(new FlowLayout(FlowLayout.CENTER));
  
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setResizable(false);
  
      frame.getContentPane().setBackground(Color.WHITE);
  
  
  
      TemplatesList lista = new TemplatesList();
      frame.add(lista, BorderLayout.SOUTH);
  
  
      frame.setVisible(true);
  }
  
  public static void main (String [] args)
  {
      new ChoosingPage();
  }
  }
  </code></pre>