framedemo.java

来自「JAVA程序设计课程中各章节的程序实例。」· Java 代码 · 共 18 行

JAVA
18
字号
/**
*A simple frame program
*2004.11.22. xhcprince
*/
import java.awt.*;

class frameDemo
{
	public static void main(String args[])
	{
		Frame f = new Frame("It's my frame");

//		f.setBacground(Color.blue);Why when I use color it's always wrong?
		f.setSize(111,111);
		f.setVisible(true);
		System.out.print(":)");  //It won't be displayed on the frame,rather it will be displayed on the System
	}				 //and I wonder why I have to use Ctrl+C to close the frame?
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?