I need a java applet to write Welcome to Java Five Times and each line ends has to end with a new line.
Printable View
I need a java applet to write Welcome to Java Five Times and each line ends has to end with a new line.
where is your code?
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class HelloWorldApplet extends Applet{
public static void main(String[] args){
Frame frame = new Frame("Roseindia.net");
frame.setSize(400,200);
Applet app = new HelloWorldApplet();
frame.add(app);
frame.setVisible(true);
frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}
public void paint(Graphics g){
g.drawString("Hello World!",200,100);
}
}
I do not know how to make this java file into a class file, I do not know how to make write Welcome to Java Five Times and make each line end with a new line.