⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 extraguidemo1.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 JAVA
字号:
/**
*Some other GUI demonstration program
*Here's a example using CheckBox and Choice list
*2005.1.11. xhcprince
*/

import java.awt.*;

public class extraGUIDemo1
{
	public static void main(String args[])
	{
		
		Frame f = new Frame();
		f.setTitle("My frame");
		f.setSize(300,150);
		
		Panel p1 = new Panel();
//		p1.setBackground(Color.pink);
		
		Choice ch = new Choice();
		ch.add("red");
		ch.add("green");
		ch.add("blue");
		ch.add("black");
		
		Checkbox cb = new Checkbox("Bold");
		
		p1.add(ch);
		p1.add(cb);
		
		TextArea ta = new TextArea(10,60);
//		Color cl = new Color(0,0,255);
//		ta.setForeground(cl);
		
		Font ft = new Font("System",Font.ITALIC + Font.BOLD,14);
						  //Input the System!	
		ta.setFont(ft);
		
		f.add("North",p1);
		f.add("Center",ta);
		
		f.setVisible(true);
	}
}

⌨️ 快捷键说明

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