Java 34 - applet
Sun Nov 26 2023 17:19:16 GMT+0000 (Coordinated Universal Time)
Saved by
@Java
import java.applet.*;
import java.awt.*;
/*<applet code="LabTask34.class" width="500" height="500">
</applet>*/
public class LabTask34 extends Applet
{
String str;
public void init()
{
str="Welcome to Java Applet";
System.out.println("Inside init method");
setBackground(Color.cyan);
setForeground(Color.blue);
}
public void start()
{
System.out.println("Inside start method");
}
public void paint(Graphics g)
{
Font f=new Font("Arial",3,27);
g.setFont(f);
g.drawString(str,200,200);
System.out.println("Inside paint method");
}
public void stop()
{
System.out.println("Inside stop method");
}
public void destroy()
{
System.out.println("Inside destroy method");
}
}
content_copyCOPY
Comments