org.eclipse.swt.SWTException: Invalid thread access
来源:互联网 发布:全国小龙虾消费数据 编辑:程序博客网 时间:2024/04/30 22:12
在SWT程序中, SWT会自动创建一个用户界面线程,非用户界面线程不能直接操作用户界面线程
要想在另外一个线程中尝试修改用户界面,应采用一下方法:
// If this is the UI thread, then make the change.
if (Display.getCurrent() != null) {
// 修改界面的代码
return;
}
// otherwise, redirect to execute on the UI thread.
Display.getDefault().asyncExec(new Runnable() {
public void run() {
// 修改界面的代码
}
});
- org.eclipse.swt.SWTException: Invalid thread access
- SWT异常: org.eclipse.swt.SWTException: Invalid thread access
- SWT异常: org.eclipse.swt.SWTException: Invalid thread access
- SWT异常: org.eclipse.swt.SWTException: Invalid thread access
- SWT多线程异常--org.eclipse.swt.SWTException: Invalid thread access
- org.eclipse.swt.SWTException: Invalid thread access问题解决方法
- RCP中的org.eclipse.swt.SWTException: Invalid thread access 问题
- org.eclipse.swt.SWTException: Invalid thread access解法
- Exception in thread "Thread-0" org.eclipse.swt.SWTException: Invalid thread access. 错误解决
- Exception in thread "Timer-0" org.eclipse.swt.SWTException: Invalid thread access
- Eclipse启动 org.eclipse.swt.SWTException: Invalid thread access问题解决方法
- ECLIPSE启动不了,报错org.eclipse.swt.SWTException: Invalid thread access
- Eclipse崩溃后无法启动的解决办法[org.eclipse.swt.SWTException: Invalid thread access]
- rcp异常org.eclipse.swt.SWTException: Invalid thread access的解决方法
- elipse启动报错:org.eclipse.swt.SWTException: Invalid thread access
- rcp(插件开发)异常:Exception in thread "Thread-7" org.eclipse.swt.SWTException: Invalid thread access
- org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
- SWT异常: Invalid thread access
- 完全用 GNU/Linux 工作
- 如何在PS和FLASH里做渐变颜色填充的字体
- 圣经语录
- 《锦衣卫》暗藏职场上位必杀技
- Meego平台技术架构
- org.eclipse.swt.SWTException: Invalid thread access
- 引用其它插件的图片
- 一msdn地址 http://www3.upweb.net/index274-img/showlog.php?id=6406
- 10-05-01
- 软件测试概述
- linux_shell笔记(八)
- 大国际时代重新开启
- 对枚举、接口、结构的理解
- 人生需要放下的八样东西