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

📄 gridbaglayoutdemo_gui.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 JAVA
字号:
/**
*A simple GidBagLayout program in GUI
*2004.11.29. xhcprince
*/
import java.awt.*;
import java.applet.*;

public class GridBagLayoutDemo_GUI extends Applet
{
	GridBagLayout test = new GridBagLayout();

	Button b1 = new Button("one");
	Button b2 = new Button("two");
	Button b3 = new Button("three");

	public void init()
	{
		go();
	}

	public void go()
	{
		setLayout(test);
//		setBackground(Color.pink); Why the Color implements are always wrong??????
	
		add(b1);
		add(b2);
		add(b3);
	}
}
/*
<applet code = "GridBagLayoutDemo_GUI.class" width = 300 height = 160>
</applet>
*/

⌨️ 快捷键说明

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