📄 dwevtqueue.java
字号:
package com.dwipal;
import java.awt.*;
/** This class implements the "DoEvents" function, which allows
* the event queue to perform its events.
*/
public class DwEvtQueue extends java.awt.EventQueue {
/** Create a new instance of the class
*/
public DwEvtQueue() {
}
/** execute the event queue
*/
public void doEvents()
{
Toolkit toolKit = Toolkit.getDefaultToolkit();
EventQueue evtQueue = toolKit.getSystemEventQueue();
// loop whilst there are events to process
while (evtQueue.peekEvent() != null)
{
try
{
// if there are then get the event
AWTEvent evt = evtQueue.getNextEvent();
// and dispatch it
super.dispatchEvent(evt);
}
catch (java.lang.InterruptedException e)
{
// if we get an exception in getNextEvent()
// do nothing
;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -