title: Exception in thread "AWT-EventQueue-0" NullPointerException
body: <p>I'm a newbie in Java and I'm trying to add a button in my window, but I'm having some troubles. </p>
  
  <p>First of all, I created a new jLabel, left blank the "text" and chose a image from my images folder (inside my project). After that, I added a new jButton, and again leftblank the "text" and chose a imagem from my images folder.  </p>
  
  <h3>Here's my project structure:</h3>
  
  <pre><code>control
  Images
  |- A lot of images (fireworks png)
  
  Model
  |- Connection.java
  
  View
  |- MainMenu.java
  </code></pre>
  
  <p>I think it's everything ok, but when I try to run this code, I have the following error message: </p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at javax.swing.ImageIcon.&lt;init&gt;(ImageIcon.java:205)
      at view.TelaInicialLocus.initComponents(MainMenu.java:53)
      at view.TelaInicialLocus.&lt;init&gt;(MainMenu.java:17)
      at view.TelaInicialLocus$2.run(MainMenu.java:133)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:688)
      at java.awt.EventQueue$3.run(EventQueue.java:686)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
  </code></pre>
  
  <h3>Lines of code:</h3>
  
  <pre><code>line 17:
  initComponents();
  
  line 53/57:
          jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logo2.png"))); // NOI18N
          jLabel3.setMaximumSize(new java.awt.Dimension(200, 200));
          jLabel3.setMinimumSize(new java.awt.Dimension(200, 200));
  
          jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/entrar.fw.png")));
  
  line 115/145:
  public static void main(String args[]) {
          try {
              for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                  if ("Nimbus".equals(info.getName())) {
                      javax.swing.UIManager.setLookAndFeel(info.getClassName());
                      break;
                  }
              }
          } catch (ClassNotFoundException ex) {
              java.util.logging.Logger.getLogger(TelaInicialLocus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (InstantiationException ex) {
              java.util.logging.Logger.getLogger(TelaInicialLocus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (IllegalAccessException ex) {
              java.util.logging.Logger.getLogger(TelaInicialLocus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (javax.swing.UnsupportedLookAndFeelException ex) {
              java.util.logging.Logger.getLogger(TelaInicialLocus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          }
          //&lt;/editor-fold&gt;
  
          /* Create and display the form */
          java.awt.EventQueue.invokeLater(new Runnable() {
              public void run() {
                  new TelaInicialLocus().setVisible(true);
              }
          });
      }
  </code></pre>
  
  <p>I am willing to help with more information and code. What can I do to solve this problem? </p>