/**
* Switches the wait cursor on the NetBeans glasspane of/on
*
* @param on
*/
public static void setWaitCursor(final boolean on) {
Runnable r = new Runnable() {
@Override
public void run() {
JFrame mainWindow = (JFrame) WindowManager.getDefault().getMainWindow();
mainWindow
.getGlassPane()
.setCursor(Cursor.getPredefinedCursor(
on ?
Cursor.WAIT_CURSOR :
Cursor.DEFAULT_CURSOR));
mainWindow.getGlassPane().setVisible(on);
}
};
if(EventQueue.isDispatchThread()) {
r.run();
} else {
EventQueue.invokeLater(r);
}
}
Utils.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录