java的gui(二)
既然这EventDispatchThread是一个线程,那肯定是从run方法开始了
run中的finally块中有块有意思的代码
/* * Fix for 4648733. Check both the associated java event * queue and the PostEventQueue. */ if (theQueue.peekEvent() != null || !SunToolkit.isPostEventQueueEmpty()) { theQueue.initDispatchThread(); }