Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static void main(String[] argv) throws Exception {
        // Modal dialog with OK button
        String message = "Line1\nLine2";
        JFrame frame = new JFrame();
        JOptionPane.showMessageDialog(frame, message);
    }
}