Friday, January 22, 2016

Program to create frame.

import java.awt.*;
class FrameDemo extends Frame
{
public FrameDemo(String title)
{
super(title); //calling constructor of base class Frame
    }
public static void main(String arg[])
{
FrameDemo f=new FrameDemo("I have been Framed!");
f.setSize(500,500);
f.setVisible(true);
}
}
Output:

No comments:

Post a Comment