flowwindow.java
来自「这是一个java程序」· Java 代码 · 共 31 行
JAVA
31 行
//演示FlowLayoutimport java.awt.*;public class FlowWindow extends Frame { public FlowWindow() { setLayout(new FlowLayout()); setFont(new Font("Helvetica", Font.PLAIN, 14)); add(new Button("Button 1")); add(new Button("2")); add(new Button("Button 3")); add(new Button("Long-Named Button 4")); add(new Button("Button 5")); } public boolean handleEvent(Event e) { if (e.id == Event.WINDOW_DESTROY) { System.exit(0); } return super.handleEvent(e); } public static void main(String args[]) { FlowWindow window = new FlowWindow(); window.setTitle("FlowWindow Application"); window.pack(); window.show(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?