更新时间:2023-11-22 16:38:52
您可以非常轻松地做到这一点.将这些行作为输出放在字符串中,然后在 JOptionPane 中打印.将数据添加到 arraylist 后,只需执行以下操作.
You can do this very easily. Put those lines in a String as an output and then print that in JOptionPane. After adding your data to arraylist just do the following.
String output = "";
for(int i = 0; i<games.size(); i++){
String everything = sku.get(i).toString();
String everything2 = games.get(i).toString();
output += everything +" "+ everything2 + "\n";
}
JOptionPane.showMessageDialog(null, output);