MesageDialogWithStringArray.java Source code

Java tutorial

Introduction

Here is the source code for MesageDialogWithStringArray.java

Source

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class MesageDialogWithStringArray {
    public static void main(final String[] args) {
        JFrame parent = new JFrame();

        String multiLineMsg[] = { "Hello,", "World" };
        JOptionPane.showMessageDialog(parent, multiLineMsg);
    }
}