Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.concurrent.Callable;

import java.util.concurrent.FutureTask;

import static javax.swing.SwingUtilities.invokeLater;

public class Main {
    public static <T> FutureTask<T> callLater(final Callable<T> callable) {
        final FutureTask<T> futureTask = new FutureTask<>(callable);
        invokeLater(futureTask);
        return futureTask;
    }
}