SwingWrapper exposes a JFrame on the calling thread, while it modifies it on the EDT.
See original GitHub issueHello, I noticed this stack overflow question, and it appears to be due to the fact, in SwingWrapper the frame is created on the calling thread and returned, but it is being modified on the EDT.
One way this could be fixed would be to call SwingUtils.invokeAndWait()
on line 102.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
I try to display xChart in my application end with Cannot call ...
When I click a button is suppose to open the swingwrapper JFrame with the chart but its end with error.What I am missing...
Read more >Improve Application Performance With SwingWorker in Java ...
This thread draws GUI components, updates them, and responds to user interactions by calling the application's event handlers. All event handlers run on...
Read more >Java Swing: creating a simple GUI application
class SimpleGui extends JFrame { public SimpleGui(String title) { super(title) ... code must run on a special thread called the event dispatch thread...
Read more >Multithreading and Concurrency - Java Programming Tutorial
Let's modify the program by making a call to the counting-thread's ... to the EDT regularly */ public class UnresponsiveUIwThreadSleep extends JFrame ......
Read more >org.knowm.xchart.SwingWrapper java code examples - Tabnine
SwingWrapper.displayChartMatrix(...) /** * Display the charts in a Swing JFrame * * @param windowTitle the title of the window * @return the JFrame...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would recommend just using the invokeAndWait() but leave EXIT_ON_CLOSE. That way it doesn’t change the behavior of existing apps.
ok, thanks.