?? flow.java
字號:
//file: Flow.javaimport java.awt.*;import java.awt.event.*;import javax.swing.*;public class Flow extends JPanel { public Flow( ) { // FlowLayout is default layout manager for a JPanel add(new JButton("One")); add(new JButton("Two")); add(new JButton("Three")); add(new JButton("Four")); add(new JButton("Five")); } public static void main(String[] args) { JFrame f = new JFrame("Flow"); f.addWindowListener(new WindowAdapter( ) { public void windowClosing(WindowEvent e) { System.exit(0); } }); f.setSize(400, 75); f.setLocation(200, 200); Flow flow = new Flow( ); f.setContentPane(flow); f.setVisible(true); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -