Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import javax.swing.SwingUtilities;

public class Main {
    static void invokeAndWait(Runnable task) {
        if (SwingUtilities.isEventDispatchThread()) {
            task.run();
        } else {
            try {
                SwingUtilities.invokeAndWait(task);
            } catch (Exception ex) {
                ex.printStackTrace();
                ex.getLocalizedMessage();
            }
        }
    }
}