import java.awt.*;
import java.awt.Color.*;
public class TestFrame {
public static void main(String[] args) {
Frame f = new Frame("my first test");<span style="white-space:pre"> </span>//建立一个图形类
f.setLocation(300,300);
f.setSize(200,200);
f.setBackground(Color.yellow);
f.setVisible(true);<span style="white-space:pre"> </span>//是否可见,如果为flase的话,那么这个窗口就看不见了
f.setResizable(true);<span style="white-space:pre"> </span>//表示可以改变大小
}
}
关于图形编程
最新推荐文章于 2024-03-04 22:54:56 发布