import java.awt.*;
public class HelloMan extends Frame
{
Label lbl=new Label("欢迎大家,希望能成为朋友");
Button b1=new Button("确定");
HelloMan(String s)
{
super(s);
setLayout(new GridLayout(2,1));
add(lbl);
add(b1);
}
public static void main(String[] arg)
{
HelloMan f=new HelloMan("欢迎");
f.setSize(300,200);
f.show();
}
}