event-dispatch-thread Questions
4
Solved
We all know we should do all GUI related tasks from the event dispatch thread and that weird bugs can be introduced otherwise - I try to remember this rule but I must admit I've noticed a couple of...
Salesperson asked 16/12, 2011 at 1:47
4
Solved
I recently found an example code:
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
The create...
Runstadler asked 3/10, 2013 at 19:2
2
I have found many tutorials and examples on using the EDT correctly, I would however like to hear how one should go the other way around: check a complex application which has a Swing GUI and many ...
Ortrude asked 20/7, 2013 at 8:10
3
Solved
I am making an RPG with a tilemap. To generate the tilemap i loop through a 2 dimensional array but that means that when I repaint I have to do that each time. If I repaint too much the screen flic...
Chino asked 31/7, 2013 at 8:55
4
Solved
I read that all the code which constructs Swing components and handles Events must be run by the Event Dispatch Thread. I understand how this is accomplished by using the SwingUtilities.invokeLater...
Poly asked 3/9, 2010 at 14:12
1
Solved
I am developing an application in which a lot of operations are added in ASINetworkQueue.The operations are basically used for fetching the image from server and then in successful completion set t...
Eudy asked 20/3, 2012 at 11:29
3
I have a SwingWorker class as follows:
class RemotePlayersWorker extends SwingWorker<String[][], Object> {
PlayerCanvas parent;
RemoteHandler remote;
String[][] players;
int maximumConn...
Phosphine asked 17/3, 2013 at 9:9
2
Solved
I have a few questions about Platform.runLater. I have a JavaFX Application class. In this class I run a thread (The thread reads data from a network socket).
Now when I create a new Stage inside ...
Schneider asked 1/3, 2013 at 14:43
4
Solved
In order to make SwingTimer accurate, I like the logic and example suggested by @Tony Docherty
On CR. Here is the Link.
In order to highlight the given words, again and again, there is always a f...
Penumbra asked 23/2, 2013 at 13:21
1
Solved
I've been reading a lot about Swing, threading, invokeLater(), SwingWorker, etc., but I just can't seem to get my head around it all, so I was trying to create a really simple program to illustrate...
Guberniya asked 27/2, 2013 at 1:2
3
The code I'm referencing is proprietary and requires a multicast server, so I can't post an SSCCE snippet. I understand this may preclude any helpful insight which would elicit viable responses...
...
Heptad asked 20/2, 2013 at 18:37
2
Solved
The EventQueue javadoc states that it is required that enqueued events are dispatched sequentially and in order.
Is it correct that Runnables enqueued with EventQueue.invokeLater are guaranteed to...
Plead asked 25/1, 2013 at 17:19
1
I developing tetris game using applets. I have generated random shapes and making it move. But i don't know how to make it settle at the bottom. My shapes are vanishing once it reaches the end of t...
Roar asked 21/1, 2013 at 6:22
1
In my tool, I record events generated from user application. Now user can use my tool to replay his scenario.
While replaying user's recorded scenario, I post recorded events to "EventQueue" one b...
Overelaborate asked 18/1, 2013 at 11:31
4
Solved
I am fairly new to java, and am starting to get into using different threads in order to use wait() or sleep() on one part of my code and have the others still run.
For this project, I am using JF...
Reprehension asked 28/12, 2012 at 18:55
5
Solved
What does SwingUtilities.invokeLater do? Is it just delaying the execution of a block of codes inside its run method? What is the difference between calling an action within the invokeLater f...
Ginseng asked 4/7, 2011 at 6:8
1
Solved
So I am aware that JavaFx's method of updating the GUI while using a thread is called Task but does the code work in similar way or are there any differences. let me give you a swing example:
Anot...
Enthrone asked 20/10, 2012 at 0:55
3
Solved
I have a Gui application in swing that prints a ticket on a serial thermal printer. When i hit the button that launch this action, my GUI is frozen. I think that's because the code is executed on t...
Rauwolfia asked 4/10, 2012 at 13:41
4
Solved
Are there any libraries that instrument code to verify that methods called on Swing components are called on the Event Dispatch Thread? It probably wouldn't be too difficult to write some basic cod...
Reviel asked 10/6, 2010 at 13:48
2
Solved
Ok this one is really weird. Every first time my application opens a JFileChooser it throws a IOException then some icons don't show properly.
java.io.IOException
at sun.awt.image.GifImageDecoder...
Gauleiter asked 27/10, 2011 at 8:15
1
Solved
The common way to interact with EDT from swing worker is useing get() method. But i have a long task and code like this:
public Void doInBackground() {
for(Object o : objects) {
doSomething();
...
Kenya asked 10/8, 2012 at 8:2
5
Solved
I have this ActionListener that gets called in the EDT. My plot() function is computationally heavy, it can easily take five seconds. It made the GUI hang as expected. I added the SwingUtilities.in...
Diehard asked 19/11, 2010 at 17:34
3
Solved
I have a simple groovy script that from its main thread of execution needs to display some dialog boxes to the user.
My swing knowledge is limited and rusty but I recall reading about the need to...
Addy asked 30/3, 2011 at 20:28
3
Solved
This question is related somewhat to the one i asked HERE.
Now, i have a class "Controller" which consists of the main method and all the swing components. there is a class named "VT...
Swordbill asked 23/6, 2012 at 17:42
3
Solved
When exactly is the EDT started? What line of code is responsible of it?
My guess is that "someSwingComponent.setVisible(true)" does the trick, but I'm not sure.
Thanks!
Labionasal asked 26/5, 2012 at 21:22
© 2022 - 2024 — McMap. All rights reserved.