I have a Swing JFrame. If I create a new JFrame in a new thread at runtime, where will the EDT be? In the current thread of the last JFrame or in the first window.
EDIT: Thanks for your answers.
I understand them, and I'm fine with them. I know that we should not create a swing object elsewhere that EDT, but I encounter problems.
I will explain; I developed a JAVA application for creating and extracting an archive such as winrar. You can create multiple archives at the same time with multiple threads. And recently, I wanted to add the status of information when creating an archive as a JprogressBar in a new JFrame with each creation. But my problem is to create a connection in a new state frame and the stream that the archive creates. Therefore, I create a JFrame in the archive stream to update the current progress bar.
But, as I could read it in various sources of information and your answers / comments, this is against java swing and performance; I cannot create a rocking object elsewhere that EDT.
But then, how should I solve my problem?
java swing
damson Aug 26 '11 at 13:41 2011-08-26 13:41
source share