Code:
import javax.swing.JOptionPane;
public class ArrayTest {
public static void main(String[] args) {
printInOptionPane(new int[8][100]);
}
public static void printInOptionPane(int[][] mijnArray) {
int lengte_1 = mijnArray.length;
int lengte_2 = mijnArray[0].length;
int z = lengte_1 * lengte_2;
String output = "";
for (int x = 0; x < lengte_1; x++){
for (int y = 0; y < lengte_2; y++){
output = output + z-- + " ";
}
output = output + "\n";
}
JOptionPane.showMessageDialog(null, output, "mijnArray", JOptionPane.INFORMATION_MESSAGE);
}
}