Affects Version/s: None
Fix Version/s: None
Inexperienced Swing users often modify/create/... Swing components on another thread then the EDT. Checks in the SwingX components for the use of the correct thread, and a clear exception message when on the wrong thread would result in clear exceptions instead of vague threading issues.
As already mentioned by kleopatra in the comments
Though not entirely sure how we could do it without breaking backwards compatibility: there are rare cases when the EDT violation doesn't throw up, adding a check which barks will break those
Possible solutions for this:
- Use an assert for the check. Production code can run without asserts
- Hide it behind a logger, e.g.
- Hide the checks behind a system property check (system property check to disable the check, so that it is on by default)