import java.applet.*;
import java.io.*;
import java.awt.*;
class Frame1 extends Frame
{
Frame1(String s)
{
super(s);
}
public void paint(Graphics g)
{
g.drawString("Manimathes",50,100);
g.drawString("MCA",50,200);
g.drawString("Narasu's Sarathy Institute of Technology",50,300);
}
}
public class appframe extends Applet
{
Frame1 F;
Font a=new Font("TimesNewRoman",Font.BOLD,50);
public void init()
{
F=new Frame1("Frame Window");
F.setLocation(50,50);
F.setBackground(Color.red);
F.setSize(300,200);
F.setFont(a);
F.setVisible(true);
}
}
//<applet code="appframe" width=300 height=400>
</applet>//
import java.io.*;
import java.awt.*;
class Frame1 extends Frame
{
Frame1(String s)
{
super(s);
}
public void paint(Graphics g)
{
g.drawString("Manimathes",50,100);
g.drawString("MCA",50,200);
g.drawString("Narasu's Sarathy Institute of Technology",50,300);
}
}
public class appframe extends Applet
{
Frame1 F;
Font a=new Font("TimesNewRoman",Font.BOLD,50);
public void init()
{
F=new Frame1("Frame Window");
F.setLocation(50,50);
F.setBackground(Color.red);
F.setSize(300,200);
F.setFont(a);
F.setVisible(true);
}
}
//<applet code="appframe" width=300 height=400>
</applet>//
No comments:
Post a Comment