java—将数组存储在jdialogbox中并调用它以在另一个jdialogbox中显示

pinkon5k  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(173)

我尝试将jdialogbox中的结果存储在数组中,并调用它在另一个jdialogbox的jtextfield中显示,但它似乎无法显示,并且一直有错误

//create array
String simple [] = new String [20];

//storing into array
for (int i = 0; i < 20; i++) {
    simple [i] = num1 + num2 + "=" + output;
    simple [i].toString();
}

//calling array to display at another dialog box
SimpleCalculator cal = new SimpleCalculator();
String text = "";
for (int i = 0; i < 20; i++) {
    text = text + cal.simple[i] + "\n";
    if(cal.simple[i].equals(null)) {
        cal.simple[i] = "";
        text = text + cal.simple[i] + "\n";
}

源代码如下:https://drive.google.com/drive/folders/16hsnmebuhae8siwzh6s3vthqaly_cn0l?usp=sharing

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题