Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.awt.Component;
import java.awt.Dimension;

import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class Main {
    public static void showInfo(Component parent, String message) {
        Component cmp = new JScrollPane(new JTextArea(message));
        cmp.setPreferredSize(new Dimension(400, 400));
        JOptionPane.showMessageDialog(parent, cmp, "Information", JOptionPane.INFORMATION_MESSAGE);
    }
}