Questions tagged [edt]

For questions about edt, a line/screen editor, found on vax/vms systems. The Event Dispatch Thread in Java Swing applications is also abbreviated EDT. The tag [event-dispatch-thread] is used for that.

A line/screen editor, found on vax/vms systems.

The Event Dispatch Thread in Java Swing applications is also abbreviated EDT. The tag is used for that.

52 questions
1
vote
1 answer

Codename One: Background threads needing access to the UI

My app has background threads that need to access the UI. Imagine a chess program (AI) that "thinks" for a number of seconds before it plays a move on the board. While the thread runs the UI is blocked for input but there is still output. There are…
J-J
  • 419
  • 2
  • 12
1
vote
1 answer

Performance issue displaying JFreeChart points, when running in the EDT

Background: A well-known Swing best-practice requirement is that code that interacts with the Swing framework must also execute in EDT (Event Dispatch Thread). I thus changed my code to have my JFreeChart-based updates to run in EDT. However,…
caecilius
  • 55
  • 6
1
vote
2 answers

Why EventDispatchThread in first place?

This is the design decision I don't understand. Both Android and JME follow the policy that the thread that started an app is the UI thread and you take care to offload resource-consuming stuff to another threads. In Swing, on the other hand, you…
yanchenko
  • 56,576
  • 33
  • 147
  • 165
1
vote
3 answers

Should swing event handlers be queued after the event on the EDT?

Should swing event handling code be queued after the event on the EDT? If so, is it the responsibility of the event source to schedule the event handlers, or is it the responsibility of the event handler to schedule the actual handling code…
Jesse
  • 3,751
  • 1
  • 21
  • 19
1
vote
0 answers

amazon API requests : error 503 despite some delays

I am using an amazon account to access to amazon book's database. My account is used only for this, and I don't sell anything with it. I can't access to the amazon API 5 times one after the other, in spite of a 2 seconds delay between each another :…
lolveley
  • 1,659
  • 2
  • 18
  • 34
1
vote
2 answers

Stopping another thread from the EDT (EventQueue)

So I created a basic swing interface with a stop button, and clicking it should stop a counting thread. When the application starts, a thread instance would allocate a runnable class which does a counting loop and logs it in the console. There is a…
ELM
  • 529
  • 2
  • 7
  • 19
1
vote
0 answers

Multiple EventDispatcher threads in Swing

In a big project i found in the logs that multiple event dispatcher threads are used after a longer runtime: multiple Threads : 3x java.awt.EventDispatchThread "AWT-EventQueue-{0,1,2}" The log output is from a function to detect multiple…
alex
  • 5,516
  • 2
  • 36
  • 60
1
vote
2 answers

How to find all tables using a defined EDT?

How does one create a job which finds all tables containing a particular extended data type? I found this JOB, but it gives me an error: https://fredshen.wordpress.com/2006/02/05/find-out-tables-containing-specific-edt/
ulisses
  • 1,549
  • 3
  • 37
  • 85
1
vote
1 answer

How to discard/coalesce repeated AWT events?

When a user does some action (such as click a button), I need to display the status in the JLabel. This status needs to disappear after 2 seconds. I use the following for that. Timer timer = new Timer(2000, new ActionListener() { @Override …
user592748
  • 1,194
  • 3
  • 21
  • 45
1
vote
2 answers

Is it OK to call Future.get() on a non-EDT thread from the EDT thread?

This is in the context of unit testing (as it happens). At the end of a test, whatever the result, I want the code to check for the presence (visibility) of a JFileChooser dialog... and if visible, dismiss it. There are different ways of dismissing…
mike rodent
  • 14,126
  • 11
  • 103
  • 157
1
vote
0 answers

Does java.awt.Desktop need to be used on the EDT?

Looking around I couldn't find a requirement that java.awt.Desktop is required to be used on the EDT, and I couldn't think of a reason why it should be, but I couldn't find anywhere that explicitly says it is fine, so I thought I would ask, since it…
Yishai
  • 90,445
  • 31
  • 189
  • 263
1
vote
3 answers

Can i run 2 GUI actions in the EDT?

In a JDialog, when user clicks a JButton i want to execute 2 GUI actions in the EDT : Showing another small JDialog with a busy icon in it to tell the user "Please wait while the wrong process ends". Inserting a big number of records in a…
Brad
  • 4,457
  • 10
  • 56
  • 93
1
vote
1 answer

Is it possible that EDT violations cause NullPointerException in an external software?

I have a Java software that was recently integrated into another Java software (which I will call "external" software). We use listeners and call back mechanisms for "communication" between two softwares. Creators of the "external" software say that…
Roman
  • 124,451
  • 167
  • 349
  • 456
1
vote
2 answers

How to wait for object creation in EDT without blocking EDT?

I am using an API in a Java library which is called from the event dispatch thread and requires me to return a fully-initialized UI component. It looks like this: public JDialog createDialog(); But I can only populate the dialog after loading from…
Ed Frommer
  • 13
  • 3
1
vote
3 answers

Swing: Changing a label on hidden frame and then showing the frame happens in reverse order on EDT

The Problem I create a dialog box in swing (JRE 6 update 10, Ubuntu linux). When the user has finished using the dialog box it is hidden. When the users click on a button in another frame, a label on the box is changed according to the button, and…
Mark Silberbauer
  • 917
  • 1
  • 8
  • 13