J
Jenny
Hi,
In an Applet program, it does not have an instance. Could you tell me
why? Thanks a lot.
Below is a sample:
import java.awt.*;
public class SalutonApplet extends javax.swing.JApplet {
String greeting;
public void init() {
greeting = "Saluton mondo!";
}
public void paint(Graphics screen) {
Graphics2D screen2D = (Graphics2D)screen;
screen2D.drawString(greeting, 25, 50);
}
}
In an Applet program, it does not have an instance. Could you tell me
why? Thanks a lot.
Below is a sample:
import java.awt.*;
public class SalutonApplet extends javax.swing.JApplet {
String greeting;
public void init() {
greeting = "Saluton mondo!";
}
public void paint(Graphics screen) {
Graphics2D screen2D = (Graphics2D)screen;
screen2D.drawString(greeting, 25, 50);
}
}