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

📄 multicomponentsdemo2_gui.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 JAVA
字号:
/**
*A simple multi components program using layout in GUI
*2004.11.27. xhcprince
*Pay attention to the difference to the previous multicomponentsDemo_GUI.java !
*/
import java.awt.*;

public class multicomponentsDemo2_GUI extends Frame
{
	public multicomponentsDemo2_GUI()
	{
		add(new Label("First name"));
		add(new TextField(10));
		add(new Label("Second name"));
		add(new TextField(10));
		add(new Label("Password"));
		add(new TextField(10));
		add(new Button("Save"));
	}

	public static void main(String args[])
	{
		multicomponentsDemo2_GUI M2 = new multicomponentsDemo2_GUI();
		M2.setLayout(new FlowLayout());

		M2.setVisible(true);
		M2.setSize(400,300);
	}
}

⌨️ 快捷键说明

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