title: Not calling SwingUtilities.invokeLater() causes NullPointerException
body: <p>I have a created a class of ComboBox popup menu listener to change the width of popup menu from the actual width of combobox.</p>
  
  <pre><code>protected void customizePopup(BasicComboPopup popup)
  {
      scrollPane = getScrollPane(popup);
  
      if (popupWider)
          popupWider( popup );
  
      checkHorizontalScrollBar( popup );
  
      //  For some reason in JDK7 the popup will not display at its preferred
      //  width unless its location has been changed from its default
      //  (ie. for normal "pop down" shift the popup and reset)
  
      Component comboBox = popup.getInvoker();
      Point location = comboBox.getLocationOnScreen();
  
      if (popupAbove)
      {
          int height = popup.getPreferredSize().height;
          popup.setLocation(location.x, location.y - height);
      }
      else
      {
          int height = comboBox.getPreferredSize().height;
          popup.setLocation(location.x, location.y + height - 1);
          popup.setLocation(location.x, location.y + height);
      }
  }
  </code></pre>
  
  <p>And this method is called from </p>
  
  <pre><code>public void popupMenuWillBecomeVisible(PopupMenuEvent e)
  {
      JComboBox comboBox = (JComboBox)e.getSource();
  
      if (comboBox.getItemCount() == 0) return;
  
      final Object child = comboBox.getAccessibleContext().getAccessibleChild(0);
  
      if (child instanceof BasicComboPopup)
      {
          SwingUtilities.invokeLater(new Runnable()
          {
              public void run() {
                  customizePopup((BasicComboPopup)child);
              }
          });
      }
  }
  </code></pre>
  
  <p>calling method CustomizePopup() outside EDT causes NullPointerException.</p>
  
  <p>Can anyone tell me what is the reason??</p>
  
  <p><strong>Why do we need another EDT to process CustomizePopup()?</strong></p>
  
  <pre><code>public void popupMenuWillBecomeVisible(PopupMenuEvent e)
  {
      JComboBox comboBox = (JComboBox)e.getSource();
  
      if (comboBox.getItemCount() == 0) return;
  
      final Object child = comboBox.getAccessibleContext().getAccessibleChild(0);
  
      if (child instanceof BasicComboPopup)
      {
          customizePopup((BasicComboPopup)child);
      }
  }
  </code></pre>