Similar programs
import java.awt.*;
import java.applet.*;
public class AppletDemo extends Applet
{
String s="";
public void init()
{
setBackground(Color.cyan);
setForeground(Color.blue);
s = "--inside init--";
}
public void start()
{
s = s+"--inside start--";
}
public void paint(Graphics g)
{
s = s+"--inside paint--";
g.drawString(s,10,20);
}
}
- Applet program to draw line
- Applet program to draw rectangle and round rectangle
- Calculator program using Applet
import java.awt.*;
import java.applet.*;
public class AppletDemo extends Applet
{
String s="";
public void init()
{
setBackground(Color.cyan);
setForeground(Color.blue);
s = "--inside init--";
}
public void start()
{
s = s+"--inside start--";
}
public void paint(Graphics g)
{
s = s+"--inside paint--";
g.drawString(s,10,20);
}
}
0 comments:
Post a Comment