java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Oracle Community by 807577, 1 year ago
Cannot call invokeAndWait from the event dispatcher thread
via Oracle Community by 771514, 1 year ago
Cannot call invokeAndWait from the event dispatcher thread
via GitHub by bflorat
, 2 years ago
Cannot call invokeAndWait from the event dispatcher thread
via Google Groups by Quentino, 3 months ago
Cannot call ^^^^^^^^^^^ > invokeAndWait from the event dispatcher thread ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
via Stack Overflow by Jakir00
, 2 years ago
Cannot call invokeAndWait from the event dispatcher thread
via Google Groups by John, 4 months ago
Cannot call invokeAndWait from the event dispatcher thread
java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
at java.awt.EventQueue.invokeAndWait(EventQueue.java:534)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1146)
at SOAP.ThermoData$ProfileForm.entriesTextFieldChanged(ThermoData.java:308)
at SOAP.ThermoData$ProfileForm.access$300(ThermoData.java:29)
at SOAP.ThermoData$4.caretUpdate(ThermoData.java:153)
at javax.swing.text.JTextComponent.fireCaretUpdate(JTextComponent.java:309)
at javax.swing.text.JTextComponent$MutableCaretEvent.fire(JTextComponent.java:2554)
at javax.swing.text.JTextComponent$MutableCaretEvent.stateChanged(JTextComponent.java:2576)
at javax.swing.text.DefaultCaret.fireStateChanged(DefaultCaret.java:532)
at javax.swing.text.DefaultCaret.changeCaretPosition(DefaultCaret.java:844)
at javax.swing.text.DefaultCaret$UpdateHandler.insertUpdate(DefaultCaret.java:1124)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:180)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:542)
at javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:852)
at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:801)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1384)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2078)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2104)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2050)
at java.awt.Component.processEvent(Component.java:3612)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2652)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2556)
at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2556)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.