📄 testflowlayout.java
字号:
/* * TestFlowLayout.java * * Created on July 30, 2002, 11:35 AM */package com.samspublishing.jpp.ch13;import java.awt.*;import java.awt.event.*;/** * * @author Stephen Potts * @version */public class TestFlowLayout extends Frame{ TextField tfFirst; TextField tfSecond; TextField tfThird; TextField tfForth; TextField tfFifth; /** Creates new TestFlowLayout */ public TestFlowLayout() { setLayout(new FlowLayout()); tfFirst = new TextField("First"); tfSecond= new TextField("Second"); tfThird = new TextField("Third"); tfForth = new TextField("Forth"); tfFifth = new TextField("Fifth"); add(tfFirst); add(tfSecond); add(tfThird); add(tfForth); add(tfFifth); addWindowListener(new WinCloser()); setTitle("Using a FlowLayout"); setBounds( 100, 100, 300, 300); setVisible(true); } public static void main(String[] args) { TestFlowLayout tfl = new TestFlowLayout(); } }class WinCloser extends WindowAdapter{ public void windowClosing(WindowEvent e) { System.exit(0); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -