public class TestGraphics extends Frame{
public static void main(String[] args) {
TestGraphics gp = new TestGraphics();
gp.setBounds(300,300,100,100);
gp.setVisible(true);
}
public class TestGraphics extends Frame{
public static void main(String[] args) {
TestGraphics gp = new TestGraphics();
gp.setBounds(300,300,100,100);
gp.setVisible(true);
}
public static void main(String[] args) {
TestGraphics gp = new TestGraphics(); //实例化对象,创建了一个Frame
gp.setBounds(300,300,100,100); //将创建的界面在(300,300)的位置显示,并且大小宽100,高100
gp.setVisible(true); //所创建的界面是可见的
}