how to display an array in one message dialog
public static void printArray(double[] array) {
StringBuilder builder = new StringBuilder();
for (int a = 0; a < array.length; a++) {
builder.append(array[a]).append(" ");
}
JOptionPane.showMessageDialog(null, builder.toString());
}