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.

