Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public final static void executeLaterInEDT(Runnable functor) {
        if (functor == null)
            return;

        if (isInEDT()) {
            functor.run();
        } else {
            SwingUtilities.invokeLater(functor);
        }
    }

    public final static boolean isInEDT() {
        return SwingUtilities.isEventDispatchThread();
    }
}