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

📄 flowlayoutdemo.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 JAVA
字号:
/**
*A simple flow layout program
*2004.11.22. xhcprince
*/
import java.awt.*;

class A extends Frame
{
	A(String s)
	{
		super(s);
		setSize(300,160);
		setLayout(new FlowLayout());

		for(int i=1; i<=9; ++i)
		{
			add(new Button("Button " + i));
		}
		setVisible(true);//The buttons are from left to right,they're not folded together!
	}		         //But it's better to see the actul result!
}

class flowlayoutDemo
{
	public static void main(String args[])
	{
		A a = new A("Flow layout demostration");
	}
}//I still have to use the Ctrl+C to explicitly end the program:(

⌨️ 快捷键说明

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