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

📄 demoflowlayoutframe.java

📁 java绘图 java awt 经典绘图的例子,对于初学awt模块的人非常有帮助.
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package swing;import java.awt.Container;import java.awt.FlowLayout;import javax.swing.JButton;import javax.swing.JFrame;/** * * @author zhaolin */public class DemoFlowLayoutFrame extends JFrame {    public DemoFlowLayoutFrame(){        Container c = this.getContentPane();        FlowLayout layout = new FlowLayout();        layout.setHgap(40);        layout.setVgap(20);        c.setLayout(layout);        JButton b1 = new JButton("OK1");        JButton b2 = new JButton("OK2");        JButton b3 = new JButton("OK3");        JButton b4 = new JButton("OK4");        JButton b5 = new JButton("OK5");        JButton b6 = new JButton("OK6");        c.add(b1);        c.add(b2);        c.add(b3);        c.add(b4);        c.add(b5);        c.add(b6);        this.pack();        this.setVisible(true);            }            public static void main(String[] args) {        new DemoFlowLayoutFrame();    }}

⌨️ 快捷键说明

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