package com.shrimpking.t6;
import java.awt.*;
/**
* Created by IntelliJ IDEA.
*
* @Author : Shrimpking
* @create 2024/9/23 15:03
*/
//ch18-2
public class TestFrameColor extends Frame
{
public TestFrameColor(){
this.setTitle("Hello Java GUI"); //标题
this.setResizable(true); //可伸缩
this.setSize(300,200); //尺寸
this.setBounds(50,50,500,300); //窗口位置
this.setBackground(Color.green); //背景色
//this.setVisible(true); //可见性
}
public static void main(String[] args)
{
TestFrameColor frame = new TestFrameColor();
frame.setVisible(true);
}
}
09-30
280
09-29
1003