Java Swing UI Thread Event invokeLaterEDT(final Runnable runnable)

Here you can find the source of invokeLaterEDT(final Runnable runnable)

Description

Execute LATER the given runnable code dedicated to Swing using the Event Dispatcher Thread (EDT)

License

Open Source License

Parameter

Parameter Description
runnable runnable code dedicated to Swing

Declaration

public static void invokeLaterEDT(final Runnable runnable) 

Method Source Code


//package com.java2s;

import javax.swing.SwingUtilities;

public class Main {
    /**/*  w  ww. j  av a  2 s  .  com*/
     * Execute LATER the given runnable code dedicated to Swing using the Event Dispatcher Thread (EDT)
     * @param runnable runnable code dedicated to Swing
     */
    public static void invokeLaterEDT(final Runnable runnable) {
        // current Thread is NOT EDT, simply invoke later runnable using EDT:
        SwingUtilities.invokeLater(runnable);
    }
}

Related

  1. invokeInAWTThread(Runnable r)
  2. invokeInEventDispatchThread(@Nonnull Runnable runnable)
  3. invokeInSwingThread(Runnable r)
  4. invokeLater(final Runnable r)
  5. invokeLater(Runnable runnable, boolean forceLater)
  6. invokeLaterIfNeeded(Runnable runnable)
  7. invokeLaterOnEDT(Runnable runnable)
  8. invokeNow(Runnable runnable)
  9. invokeNowOrLater(Runnable run)