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[] args) {

        JFrame frame = new JFrame();

        frame.setVisible(true);

        String message = JOptionPane.showInputDialog(frame, "Would this be enough?.", "My dialog asks....",
                JOptionPane.INFORMATION_MESSAGE);

        System.out.println("Got " + message);

        frame.dispose();
    }
}