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

📄 icons.java

📁 21Java教程的全部源代码 北京邮电大学出版
💻 JAVA
字号:
import javax.swing.*;

public class Icons extends JFrame {
    JButton[] buttons = new JButton[24];

    public Icons() {
        super("Icons");
        setSize(335, 318);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel pane = new JPanel();
        ImageIcon icon = new ImageIcon("3dman.gif");
        for (int i = 0; i < 24; i++) {
            buttons[i] = new JButton(icon);
            pane.add(buttons[i]);
        }
        setContentPane(pane);
        show();
    }

    public static void main(String[] arguments) {
        Icons ike = new Icons();
    }
}

⌨️ 快捷键说明

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