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

📄 entrylayouttest.java

📁 codebook!
💻 JAVA
字号:
import java.awt.*;import java.awt.event.*;import javax.swing.*;/** Testbed for EntryLayout layout manager. * @author	Ian Darwin, ian@darwinsys.com * @version $Id: EntryLayoutTest.java,v 1.4 2000/11/25 17:55:21 ian Exp $ */public class EntryLayoutTest {	/** "main program" method - construct and show */	public static void main(String[] av) {		final JFrame f = new JFrame("EntryLayout Demonstration");		Container cp = f.getContentPane();		double widths[] = { .33, .66 };		cp.setLayout(new EntryLayout(widths));		cp.add(new JLabel("Login:", SwingConstants.RIGHT));		cp.add(new JTextField(10));		cp.add(new JLabel("Password:", SwingConstants.RIGHT));		cp.add(new JPasswordField(20));		cp.add(new JLabel("Security Domain:", SwingConstants.RIGHT));		cp.add(new JTextField(20));		// cp.add(new JLabel("Monkey wrench in works"));		f.pack();		f.addWindowListener(new WindowCloser(f, true));		f.setLocation(200, 200);		f.setVisible(true);	}}

⌨️ 快捷键说明

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