title: Java program is blank
body: <p>I'm currently learning Java. Or at least looking into it. I figured since it is a General Purpose programming language it would be good to learn since I could even put it to use in Web Development.</p>
  <p>I followed <a href="https://netbeans.org/kb/docs/java/gui-functionality.html" rel="nofollow noreferrer">this tutorial</a> to build a little mini calculator for adding. It was my first time doing something like this so it was pretty awesome to me. I was using the NetBeans GUI tool to do this. Everything seemed to be going fine until I Cleaned and Built the project. The .jar file didn't load when I double clicked it so I couldn't open the program using that.</p>
  <p>I decided to just click on the Run button in the NetBeans program. The program came up but the window was blank:</p>
  <p><img src="https://i.stack.imgur.com/iILCG.png" alt="Netbeans and the blank program" /></p>
  <p>Here you can see what the form should look like and what I actually get.</p>
  <p>I've also tried executing the .jar file in the command prompt using:</p>
  <pre><code>java -jar &lt;jar-file-name&gt;.jar
  </code></pre>
  <p>But I have no idea how the file system works in the command prompt so I always get an error.</p>
  <p>So my question is, does anybody know for the reasoning of why my .jar files are not working as expected and is there a solution for this?</p>
  <h2>Edit: My Code</h2>
  <pre><code>/*
   * To change this template, choose Tools | Templates
   * and open the template in the editor.
   */
  package my.numberaddition;
  
  /**
   *
   * @author Shawn
   */
  public class NumberAdditionUI extends javax.swing.JFrame {
  
      /**
       * Creates new form NumberAdditionUI
       */
      public NumberAdditionUI() {
          initComponents();
      }
  
      /**
       * This method is called from within the constructor to initialize the form.
       * WARNING: Do NOT modify this code. The content of this method is always
       * regenerated by the Form Editor.
       */
      @SuppressWarnings(&quot;unchecked&quot;)
      // &lt;editor-fold defaultstate=&quot;collapsed&quot; desc=&quot;Generated Code&quot;&gt;                          
      private void initComponents() {
  
          jPanel2 = new javax.swing.JPanel();
          jLabel1 = new javax.swing.JLabel();
          jLabel2 = new javax.swing.JLabel();
          jLabel3 = new javax.swing.JLabel();
          jTextField1 = new javax.swing.JTextField();
          jTextField2 = new javax.swing.JTextField();
          jTextField3 = new javax.swing.JTextField();
          jButton1 = new javax.swing.JButton();
          jButton2 = new javax.swing.JButton();
          jButton3 = new javax.swing.JButton();
  
          jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, &quot;Number Addition&quot;, javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
  
          jLabel1.setText(&quot;First Number&quot;);
  
          jLabel2.setText(&quot;Second Number&quot;);
  
          jLabel3.setText(&quot;Result&quot;);
  
          jButton1.setText(&quot;Clear&quot;);
          jButton1.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  jButton1ActionPerformed(evt);
              }
          });
  
          jButton2.setText(&quot;Add&quot;);
          jButton2.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  jButton2ActionPerformed(evt);
              }
          });
  
          jButton3.setText(&quot;Exit&quot;);
          jButton3.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  jButton3ActionPerformed(evt);
              }
          });
  
          javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
          jPanel2.setLayout(jPanel2Layout);
          jPanel2Layout.setHorizontalGroup(
              jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(jPanel2Layout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                      .addGroup(jPanel2Layout.createSequentialGroup()
                          .addComponent(jLabel3)
                          .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                              .addGroup(jPanel2Layout.createSequentialGroup()
                                  .addGap(53, 53, 53)
                                  .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                  .addComponent(jButton2)
                                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE))
                              .addGroup(jPanel2Layout.createSequentialGroup()
                                  .addGap(55, 55, 55)
                                  .addComponent(jTextField3))))
                      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                          .addGap(0, 0, Short.MAX_VALUE)
                          .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(jPanel2Layout.createSequentialGroup()
                          .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                              .addComponent(jLabel2)
                              .addComponent(jLabel1))
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                              .addComponent(jTextField1)
                              .addComponent(jTextField2))))
                  .addContainerGap())
          );
          jPanel2Layout.setVerticalGroup(
              jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(jPanel2Layout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel1)
                      .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addGap(18, 18, 18)
                  .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                      .addComponent(jLabel2)
                      .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addGap(18, 18, 18)
                  .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                      .addComponent(jLabel3)
                      .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jButton1)
                      .addComponent(jButton2))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 30, Short.MAX_VALUE)
                  .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
          );
  
          setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  
          javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
          getContentPane().setLayout(layout);
          layout.setHorizontalGroup(
              layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGap(0, 332, Short.MAX_VALUE)
          );
          layout.setVerticalGroup(
              layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGap(0, 216, Short.MAX_VALUE)
          );
  
          pack();
      }// &lt;/editor-fold&gt;                        
  
      private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                         
          System.exit(0);
      }                                        
  
      private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
          jTextField1.setText(&quot;&quot;);
          jTextField2.setText(&quot;&quot;);
          jTextField3.setText(&quot;&quot;);
      }                                        
  
      private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
          // First we define float variables.
          float num1, num2, result;
          // We have to parse the text to a type float.
          num1 = Float.parseFloat(jTextField1.getText());
          num2 = Float.parseFloat(jTextField2.getText());
         // Now we can perform the addition.
          result = num1+num2;
          // We will now pass the value of result to jTextField3.
          // At the same time, we are going to
          // change the value of result from a float to a string.
          jTextField3.setText(String.valueOf(result));
      }                                        
  
      /**
       * @param args the command line arguments
       */
      public static void main(String args[]) {
          /* Set the Nimbus look and feel */
          //&lt;editor-fold defaultstate=&quot;collapsed&quot; desc=&quot; Look and feel setting code (optional) &quot;&gt;
          /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
           * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
           */
          try {
              for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                  if (&quot;Nimbus&quot;.equals(info.getName())) {
                      javax.swing.UIManager.setLookAndFeel(info.getClassName());
                      break;
                  }
              }
          } catch (ClassNotFoundException ex) {
              java.util.logging.Logger.getLogger(NumberAdditionUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (InstantiationException ex) {
              java.util.logging.Logger.getLogger(NumberAdditionUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (IllegalAccessException ex) {
              java.util.logging.Logger.getLogger(NumberAdditionUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (javax.swing.UnsupportedLookAndFeelException ex) {
              java.util.logging.Logger.getLogger(NumberAdditionUI.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() {
              @Override
              public void run() {
                  new NumberAdditionUI().setVisible(true);
              }
          });
      }
      // Variables declaration - do not modify                     
      private javax.swing.JButton jButton1;
      private javax.swing.JButton jButton2;
      private javax.swing.JButton jButton3;
      private javax.swing.JLabel jLabel1;
      private javax.swing.JLabel jLabel2;
      private javax.swing.JLabel jLabel3;
      private javax.swing.JPanel jPanel2;
      private javax.swing.JTextField jTextField1;
      private javax.swing.JTextField jTextField2;
      private javax.swing.JTextField jTextField3;
      // End of variables declaration                   
  }
  </code></pre>