title: Automatic made "main" class in new JFrame at netbeans GUI design
body: <p>When I create a new JFrame in Netbeans there is a main class which has been automatically created. Even if I put it inside <code>/* */</code> the code works fine. I learnt in any java program there must only one main class which is starting point of the program. </p>
  
  <ol>
  <li>What is the usage of the main class in the JFrame?</li>
  <li>Is there any problem if I keep it or delete it?</li>
  <li>When can I call the code inside the main class?</li>
  </ol>
  
  <hr>
  
  <pre><code>//    public static void main(String args[]) {
          /* Set the Nimbus look and feel */
          //&lt;editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "&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 {
                            System.out.println("111111111111111");
              for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                  if ("Nimbus".equals(info.getName())) {
                      javax.swing.UIManager.setLookAndFeel(info.getClassName());
                      break;
                  }
              }
          } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
              java.util.logging.Logger.getLogger(Welcome.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() {
                  //welcomeUser.setText("Welcome");
                  System.out.println("111111111111111");
                  //new Welcome().setVisible(true);     
                  System.out.println("333333333333333");
              }
          });*/
    //  }
  </code></pre>