title: JComboBox safety type difference in Java 7 and Java 6
body: <p>I'm using project that can be compiled both Java 6 and Java 7 platforms.
  One of the GUI classes is using JComboBox.
  Since the JComboBox changed its specification in Java 7 to generic type, it requires parametric declaration of the component. </p>
  
  <p>In Java 6 declaration like:</p>
  
  <pre><code>JComboBox mybox;
  </code></pre>
  
  <p>is okay and gives no errors, no warnings.</p>
  
  <p>In Java 7 same component declaration gives warning<br></p>
  
  <pre><code>JComboBox is a raw type. References to generic type JComboBox&lt;E&gt; should be parameterized
  </code></pre>
  
  <p>Giving parameters as Java 7 requested:</p>
  
  <pre><code>JComboBox&lt;String&gt; mybox;
  </code></pre>
  
  <p>eliminates warnings for Java 7 platform, but I get the compilation error in Java 6.</p>
  
  <p>What I can do in this case, so both Java platforms, 6 and 7, can live in peace for my project?</p>