📄 flowlayoutexample.java.polystyle.backup
字号:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class FlowLayoutExample{
public static void main (String args[]) {
JFrame frame_flow = new JFrame ("FlowLayout示例");
Container contentPane = frame_flow.getContentPane();
contentPane.setLayout(new FlowLayout());
contentPane.add(new JButton("one"));
contentPane.add(new JButton("two"));
contentPane.add(new JButton("three"));
contentPane.add(new JButton("four"));
contentPane.add(new JButton("five"));
frame_flow.pack();
frame_flow.show();
frame_flow.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e) {
System.exit(0);}});}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -