event-dispatch-thread Questions
3
Solved
Is Java capable of creating more than one EDT at a time?
I'm experimenting with setting up EDT and how it works in updating the content of a "heavy duty" panel with potentially a dozen of panels e...
Bergstein asked 7/1, 2015 at 15:36
4
Solved
Please explain to me why I am getting this crash?
Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
in this
DispatchQueue.main.sync {
print("sync")
}
This is my code.
o...
Ire asked 13/3, 2018 at 14:11
6
Solved
I have code as follows:
class SimplifiedClass extends JApplet {
private JTextArea outputText;
// Lots of methods
public void DoEverything() {
String output = "";
for(int i = 0; i <= 10; i...
Undercarriage asked 21/7, 2011 at 10:7
1
Solved
I recently saw a MVC java application in which the main method was written as:
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
Vie...
Aleda asked 11/3, 2021 at 15:10
1
How do I use javax.swing.text.AsyncBoxView to delegate text layout in JTextPane to a non-EDT thread?
I've hit the performance limits of JTextPane, while trying to implement a console style component. For the most part, my console behaves quite well, but attempts to spam it with large amounts of no...
Raisaraise asked 22/5, 2020 at 14:33
3
Solved
The problem is this:
I've a swing application running, at a certain point a dialog requires to insert username and password and to press "ok".
I would like that when the user press "ok" the swing ...
Coexist asked 28/11, 2013 at 14:51
3
Solved
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 use...
Tijuana asked 16/8, 2011 at 21:25
3
Solved
I am using a class called MyExceptionHandler that implements Thread.UncaughtExceptionHandler to handle normal exceptions in my project.
As I understand this class can't catch the EDT exceptions, s...
Annabellannabella asked 15/12, 2010 at 9:40
5
Solved
I have the following use-case:
I have code executing in Thread A (not EDT). Then I want to ask the user a question, but this must be done on the EDT as it involves Swing code (opening a dialog etc...
Tumbleweed asked 20/11, 2012 at 3:38
2
Solved
The typical Swing application starts the EDT at the beginning and when the last window is closed the Application stops basically with a System.exit either implicit or explicit.
But my little appli...
Gulledge asked 28/1, 2011 at 21:47
2
Solved
I know the subject has already been seen on many Questions and has been answered, but still, I can't get trough it.
I just want to update a progressBar while extracting some stuff of a large xml f...
Nassir asked 6/3, 2012 at 6:3
4
Solved
I successfully injected my own Java code in a running Oracle Forms application, using DLL Injection and some jni trickery. (Windows 7, 32 bits, Oracle Forms 11, JRE Java 8)
I am able to traverse t...
Polynuclear asked 11/12, 2015 at 15:38
6
Solved
I have the following fun which will be executed by non event dispatching thread. In the middle of thread, I want a
A confirmation box pop up. Thread suspend its execution.
User makes a choice.
Th...
Zacek asked 20/1, 2011 at 16:59
2
I have a heavy java project which does not work responsive to the users. I have found out that long time needed events in event dispatch thread can cause my project to work slowly. So, I have two q...
Breakthrough asked 15/6, 2016 at 17:28
3
Solved
I already know how Event Dispatch thread works. If there be short and long events in Event Dispatch thread like below, the application can't be responsive.
For the Sake of responsiveness in Swi...
Mcphail asked 17/6, 2016 at 8:55
4
Solved
I have a couple of questions with regards to Swing and using EDT for GUI updates. I just started reading on this stuff so I am a full beginner in this area:
Which operations are required to run o...
Kreit asked 6/8, 2012 at 9:3
2
I have a Java program taking 100% cpu, but seemingly doing nothing.
If I take a thread dump, there are 4 threads (out of a pool of 5) waiting to take a lock.
"Incoming WorkPool 5" - Thread t@363
...
Hysteria asked 14/4, 2015 at 13:21
2
Solved
As I tried to see if I could answer this question earlier today. I realized that I don't fully understand the Event Dispatch Thread (EDT). Googling both confirmed and helped with that and clarified...
Pickel asked 8/5, 2015 at 19:28
1
Swing requires to run from within Event Dispatch Thread (EDT). How to ensure this in Spring context?
In some tutorials, like this one, swing components are just instantiated like normal beans. Is...
Headliner asked 4/3, 2015 at 10:16
2
Solved
The above statement is mentioned in the SwingWorker javadoc.
In an application I have seen a lengthy background task runs in a distinct thread and updates the UI as well without a problem (...
Geomorphic asked 26/2, 2015 at 7:39
2
Solved
I have made quite a lot of various Swing apps and their loading time usually vary between just a few seconds and minutes depending on application UI/data size. Also in some cases application data l...
Arthrospore asked 15/10, 2014 at 10:15
2
Solved
is this better to use javax.swing.Timer inside of a swing application instead of using java.util.Timer?
for example:
Timer timer = new Timer(1000, e -> label.setText(new Date().toString()));
...
Magnus asked 29/7, 2014 at 22:2
2
Solved
I am confused with the signature of SwingUtilities.invokeLater. It takes a Runnable object. Is it this Runnable object that is handed over to the Event Dispatch Thread? Why can't I directly call cr...
Albertinaalbertine asked 10/3, 2014 at 22:56
1
Solved
Pretty sure it is this way - but I like to know for sure -
is happens-before relation given in case of invokeLater() or invokeAndWait()?
The methods are defined in (SwingUtilities respectively) A...
Asphyxiate asked 15/1, 2014 at 20:11
3
Solved
I know that it used to be considered safe to call repaint() and a few other selected methods from any thread even with Swing's threading model, however I was recently told in a comment that this is...
Co asked 3/1, 2014 at 14:35
1 Next >
© 2022 - 2024 — McMap. All rights reserved.