title: NullPointerException Error in JComboBox
body: <p>I am trying this code (in Netbeans) and i always get a long list of errors (here only the first rows)</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
  at FootballFrame.jComboBox1ActionPerformed(FootballFrame.java:64
  at FootballFrame.access$000(FootballFrame.java:3)
  at FootballFrame$1.actionPerformed(FootballFrame.java:29)
  at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260)
  at javax.swing.JComboBox.setSelectedItem(JComboBox.java:588)
  at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624)
  at Javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:835)
  </code></pre>
  
  <p>...</p>
  
  <p>The code is as follows :</p>
  
  <pre><code>  private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) 
    {                                          
        String support = (String)jComboBox1.getSelectedItem();
        league.setLeagueName(support);
    }    
  </code></pre>
  
  <p>the method league.setLeagueName(String aName) works perfectly outside ... and i really don't understand </p>