📜  java swing 按钮数组 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:28.203000             🧑  作者: Mango

代码示例1
import javax.swing.*;
//do it
public class test {

    public static void main(String[] args) {
        JButton[] buttons = new JButton[10];

        buttons[0] = new JButton("0");

        System.out.println(buttons[0].getText());
    }

}