java.lang.IllegalStateException: Assertion failed. WindowsAPI is required to be

java.lang.IllegalStateException: Assertion failed. WindowsAPI is required to be called from AWT thre

java.lang.IllegalStateException: Assertion failed. WindowsAPI is required to be called from AWT thread only,

搞不懂为什么会抛出这个异常,问问大家,是怎么造成的?
还有,怎么解决!

------解决方法--------------------------------------------------------
可能是你的程序里调用了window 的api,不被允许