Assertion failed: Access is allowed from event dispatch thread only

I am using reflection to invoke a method by
method.invoke(null, new Object[] );

But this will produce an error to me! How can i solve it?


1 comment
Comment actions Permalink

You may only call this method from the GUI thread.

andyfai wrote:

I am using reflection to invoke a method by
method.invoke(null, new Object[] );

But this will produce an error to me! How can i solve it?

 Error message: Assertion failed: Access is allowed from event dispatch thread only.
> java.lang.Throwable
> 
> 	at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:112)
> 
> 	at com.intellij.openapi.application.b.b.assertIsDispatchThread(b.java:38)
> 
> 	at com.intellij.openapi.wm.impl.o$e_.propertyChange(o$e_.java:8)
> 
> 	at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:264)
> 
> 	at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:232)
> 
> 	at javax.swing.UIManager.setLookAndFeel(UIManager.java:400)
> 
> 	at v.C6851.e(C6851)
> 
> 	at v.C6851.run(C6851)
> ]]>



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0

Please sign in to leave a comment.