Here you can find the source of isEDT()
public static boolean isEDT()
//package com.java2s; import javax.swing.SwingUtilities; public class Main { /**//from www.ja v a 2 s.c o m * Returns true if the current thread is the Event Dispatcher Thread (EDT) * * @return true if the current thread is the Event Dispatcher Thread (EDT) */ public static boolean isEDT() { return SwingUtilities.isEventDispatchThread(); } }