javanetbeansjappletappletviewer

how to write first program of applet in Netbeans with browser run?


How to write a Java Applet program in Netbeans IDE. I want to write a Java Applet program in Netbeans with run on browser. Please help me

Thanks


Solution

  • 1) Step by Step Instructions for Creating Your First Applet in NetBeans 7.2

    2) Choose File / New Project. Under Categories, select Java. Under Projects, select Java Class Library. Click Next.

    3) Under Project Name, enter the name of your application. Change the Project Location to any folder on your computer.

    4) Click Finish. The IDE creates the project folder.

    5) Right-click the project node in the Projects window or Files window and select New > Other.

    6) Under Categories, select Swing GUI Forms. Under File Types, select JApplet Form. Click Next.

    7) Under Class Name, enter the name of your applet. Leave Package blank for now (default package).

    8) Click Finish. The IDE creates the applet in the specified package. The applet opens in the Source editor.

    IMPORTANT:

    Right click your applet's background panel (not on any component or embedded panel) and choose "Set Layout..." on the pop-up menu, then select "Absolute Layout".

    Add several components (click component, click on design panel; OR right-click on design panel and choose Add From Palette).

    To Run - Right click on Projects.../.java select Run File (or SHIFT-F6)

    For complete answer click here