Home » » Frame in Java Program

Frame in Java Program

Frame in Java Program

Frame in Java Program

Frame in Java Program

import java.awt.*;
import java.applet.*;l
import java.awt.event.*;
class MyFrame extends Frame
{
Button b;
MyFrame()
{
super("My Frame");
b=new Button("Close");
SetLayout(new FlowLayout());
add(b);
addWindowListener(new WindowAdapter()
{
public void WindowClosing(WindowEvent we)
{
System.Exit(0);
//setVisible(false);
}
});
}
public void paint(Graphics g)
{
g.setFont(new Font("arial",Font.BOLD,30));
g.drawString("Thisis in frame",100,100);
}
public Static void main(String args[])
{
MyFrame f=new MyFrame();
f.setSize(200,200);
f.setVisible(true);
}

}

0 coment�rios:

Post a Comment

Link you don't want to vouch for Read more: https://html.com/seo/#ixzz5zVltiZ5g