Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Having Problem With Java GUI Program Made Using Netbeans

    Hi, I've designed the GUI of my program using the Netbeans IDE GUI builder.

    I'm having this problem where I can't run the generated code to test the GUI. It says something about missing main class.

    Can anyone help me on this? I'm really new to Java.

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    you'll have to add the main method
    Code:
    class YourClass {
      public static void main(String[] args) {
        // invoke ur class
      }
    }
    the main method is the entry point for any java application that you want to run using the java executable
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •