title: Java Compiler "Unchecked or unsafe operations" warning with JComboBox
body: <p>Basically I am a rather beginning Java student and I have to create a simple GUI that includes a JComboBox. The window is supposed to look like this: <a href="http://i.imgur.com/Jg7j4XD.jpg" rel="nofollow">http://i.imgur.com/Jg7j4XD.jpg</a></p>
  
  <p>When I compile the code (shown below) it does compile but I get the following warning in jGRASP:</p>
  
  <pre><code>Note: Lab6.java uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  </code></pre>
  
  <p>This is my code. I know it means I have to specify something involving data types (right?) but I thought I had specified enough. Thanks to anyone who can help.</p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
  
  public class Lab6 extends JFrame
  {
      private String[] choices = {"Hello", "Good-Bye"};
  
      public Lab6()
      {
          super("218 Lab 6");
          setSize(450,200);
          setVisible(true);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          setLayout(new BorderLayout());
  
          JPanel panelNorth = new JPanel();
              panelNorth.add(new JLabel("Welcome Class 218!"));
  
              JComboBox comboBox = new JComboBox(choices);
              panelNorth.add(comboBox);
  
              add(panelNorth,BorderLayout.NORTH);
      }
  
      public static void main(String[] args)
      {
          new Lab6();
      }
  }
  </code></pre>