Why a EDT violation happens?
Posted
by Roman
on Stack Overflow
See other posts from Stack Overflow
or by Roman
Published on 2010-04-28T08:30:03Z
Indexed on
2010/04/28
8:33 UTC
Read the original article
Hit count: 298
I started to use CheckThreadViolationRepaintManager
to detect EDT violations.
It complains about:
partner = getParameter("partner",generatePartnerSelectionPanel(),Design.partnerSelectionDuration);
Because it does not like generatePartnerSelectionPanel()
because it does not like JPanel panel = new JPanel();
in this method. But I cannot find out why there should be a problem around that.
In more details, generatePartnerSelectionPanel()
generates a JPanel (I do it not in the EDT) but then, in the getParameter
I add the JPanel to the main JFrame and I do it in the EDT (using invokeLater
).
So, why there should be a problem?
© Stack Overflow or respective owner