Questions tagged [eventqueue]
77 questions
70
votes
4 answers
DOM event precedence
What order of precedence are events handled in JavaScript?
Here are the events in alphabetical order...
onabort - Loading of an image is
interrupted
onblur - An element loses focus
onchange - The user changes the
content of a field
onclick - Mouse…

dacracot
- 22,002
- 26
- 104
- 152
23
votes
3 answers
How to replace the AWT EventQueue with own implementation
In order to debug strange behavior in a Swing-application I'd like to replace the AWT EventQueue with my own implementation.
Is this possible? How?
Just in case you are interested:
the implementation will be a simple wrapper around the normal…

Jens Schauder
- 77,657
- 34
- 181
- 348
9
votes
2 answers
Why do people run Java GUI's on the Event Queue
In Java, to create and show a new JFrame, I simply do this:
public static void main(String[] args) {
new MyCustomFrameClass().setVisible(true);
}
However, I have seen many people doing it like this:
public static void main(String[] args) {
…
user356178
7
votes
3 answers
java swing clear the event queue
Is it possible to do this in a standard manner?
Here is the scenario.
Start doing something expensive in EDT (EDT is blocked till the expensive operation is over).
While EDT was blocked, the user kept on clicking/dragging the mouse buttons. All the…

Santosh Tiwari
- 1,167
- 2
- 14
- 26
7
votes
2 answers
understanding the node.js event queue and process.nextTick
I'm having trouble understanding exactly how process.nextTick does its thing. I thought I understood, but I can't seem to replicate how I feel this should work:
var handler = function(req, res) {
res.writeHead(200, {'Content-type' :…

alf
- 681
- 1
- 8
- 19
6
votes
3 answers
Java EventQueue. When should I consider using it?
I'm currently looking at the EventQueue class on the Oracle website:
http://download.oracle.com/javase/1.4.2/docs/api/java/awt/EventQueue.html
But I'm not sure when I should use it? Should I use it if my class has listeners for two or more Events?
user485498
6
votes
7 answers
Bloomberg API request timing out
Having set up a ReferenceDataRequest I send it along to an EventQueue
Service refdata = _session.GetService("//blp/refdata");
Request request = refdata.CreateRequest("ReferenceDataRequest");
// append the appropriate symbol and field data to the…

Unsliced
- 10,404
- 8
- 51
- 81
6
votes
3 answers
EventQueue.invokeLater vrs SwingUtilities.invokeLater
Can someone highlight on the differences between these two and the instances both are required?!
I have an application which uses both intercheably, but want to know if one is better than the other. Obviously they both accept Runnable object, and so…

Bitmap
- 12,402
- 16
- 64
- 91
5
votes
1 answer
PyQt4 - Holding down a key detected as frequent press and release?
I've noticed some unusual behavior when the QApplication processes key events, which jeopardizes a small game I'd hoped to make.
Holding down a key causes the keyPressEvent and then keyReleaseEvent methods to be repeatedly (and very frequently)…

Anti Earth
- 4,671
- 13
- 52
- 83
4
votes
3 answers
Java API "Run on EDT if not on EDT"
Just a musing about some repetitive code I have:
Runnable run = new Runnable() {
@Override
public void run() {
// Some EDT code
}
};
if (!EventQueue.isDispatchThread()) {
SwingUtilities.invokeAndWait(run);
} else {
run.run();
}
It's…

Whired
- 259
- 1
- 11
4
votes
2 answers
NetBeans' HintsController and EventQueue
We are building an application based on the Netbeans Platform, and one part of it is an editor for a specific language we use.
We have the following class to highlight errors in the syntax:
class SyntaxErrorsHighlightingTask extends…

Marcelo
- 4,580
- 7
- 29
- 46
4
votes
1 answer
EventQueue inconsistent ID's
I have a problem with the following example code that shows inconsistent behavior for the EventQueue:
public static void main( String[] args ) throws InvocationTargetException, InterruptedException {
final long[] id1 = new long[ 1 ];
final…

Tovi7
- 2,793
- 3
- 23
- 27
3
votes
2 answers
How Does the JavaScript Interpreter add Global Statements to the Event Queue?
I am not sure how statements in the global scope are placed into the JavaScript event queue. I first thought that the interpreter went through and added all global statements into the event queue line by line, then went and executed each event, but…

Franklin V
- 230
- 1
- 6
2
votes
2 answers
How can I tell if my JComponent is receiving repaint calls from software?
I am trying to narrow down why my JComponent is not redrawing. It is odd in that I can get redraw to work on mouse press and release, but not on drag. Is there a way to print out the EventQueue or verify that the PaintEvent was carried out or…

smuggledPancakes
- 9,881
- 20
- 74
- 113
2
votes
0 answers
Why can't gdb read io_uring_cqe contents?
I am trying out loti-examples (Lord of the Uring) commit 8724d47 and liburing commit 7ff4fee on Ubuntu 20.04 with mainline kernel 5.12.
I use the following patch for loti-examples to have a better debugging experience:
diff --git a/CMakeLists.txt…

Janus Troelsen
- 20,267
- 14
- 135
- 196