Java Swing UI Thread Event assertIsEDT()

Here you can find the source of assertIsEDT()

Description

assert Is EDT

License

Open Source License

Declaration

public static void assertIsEDT() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.SwingUtilities;

public class Main {
    public static void assertIsEDT() {
        if (!SwingUtilities.isEventDispatchThread()) {
            throw new RuntimeException("Not in the event dispatch thread");
        }//from w w  w.  j a v  a  2 s.c  o m
    }
}

Related

  1. assertEventDispatcherThread()
  2. assertNotEventDispatchThread()
  3. callOnGUIThread(Runnable runnable)
  4. checkForEventDispatchThread()
  5. dispatchOnAWTThreadLater(Runnable r)