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

📄 flowlayoutdemo.java

📁 GUI代码,用与实现相关GUI的功能,如有需要即可自由下载!
💻 JAVA
字号:
/*
 * $Header$
 * $Date$ 
 * $Revision$
 * Copyright (C) 2003-2004 CIC, Tsinghua Univ. 
 */
package jcase.gui;
import java.awt.Dimension;
import java.awt.Label;
import java.awt.FlowLayout;

public class FlowLayoutDemo extends BaseDemo {
	Label one, two, three, four;
	
	protected void init() {
		// 设置左对齐的 flow layout
		setLayout(new FlowLayout(FlowLayout.LEFT));

		one = new Label("这是一个标签");
		two = new Label("第二个标签");
		three = new Label("这是演示FlowLayout的例子");
		four = new Label("这里使用了FlowLayout的左对齐方式");

		add(one);
		add(two);
		add(three);
		add(four);				
	}
	
	public Dimension getPreferredSize() {
		return new Dimension(250,200);
	}
	public String getTitle()  {
		return ("FlowLayout示例");	
		
	}	
	
}

⌨️ 快捷键说明

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