Problems with UI
Answered
Hi there,
i got very often errors like this:
WARN - tellij.ide.HackyRepaintManager - Access to realized (ever shown) UI components should be done only from the AWT event dispatch thread, revalidate(), invalidate() & repaint() is ok from any thread
java.lang.Exception
on Actions like this
subtitle.setText("");
Trivial Action, but no trivial Error or Warning... what does it mean?
Please sign in to leave a comment.
It means, as it says, that you do this setText from some thread other than AWT/Swing thread, and this might lead to a deadlock or strange artifacts on the screen because of concurrency issues. The usual solution is to use SwingUtilities.invokeLater/invokeAndWait or same-named methods in ApplicationManager.getApplication().
Thank you. On Stackoverflow if found this snippet what helped: