Creating a .class with netbeans

learning java through a book and in one lesson it has you create a script so that it displays text through a web browser, but in order to do that i need to make a .class of the original script and im not to sure how to create one with netbeans. also is it possible to create an html command through netbeans too?

import java.awt.*;

public class RootApplet extends javax.swing.JApplet {

int number;

public void init() {

number = 225;

}

public void paint(Graphics screen) {

Graphics2D screen2D = (Graphics2D) screen;

screen2D.drawString("The square root of " +

number +

" is " +

Math.sqrt(number), 5, 50);

}

}

-

then it has u create a html command seperate from oen above

<applet code="RootApplet.class" height="100" width="300"

></applet>

i was able to get it to work by finding the .class file on the CD it provided but i wouldnt of been able to get it to work with out copying the .class it has on the CD for the example in the book. how do i create .class with netbeans

picture attached if it helps any, and i wasnt able to make it run with out the .html or .class in the same package as the rootapplet when i ran the rootapplet.

[1270 byte] By [logicanea] at [2007-11-27 4:42:38]
# 1
http://img.photobucket.com/albums/v469/shark500232/htmlproblem.jpgpic attached
logicanea at 2007-7-12 9:54:14 > top of Java-index,Java Essentials,New To Java...
# 2
My advice is to forget about Netbeans for now. It will just complicate things when you're trying to learn the very basics. Go through this tutorial, it will show you how to compile your java files. http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
hunter9000a at 2007-7-12 9:54:14 > top of Java-index,Java Essentials,New To Java...