Questions tagged [secondaryloop]

java.awt.SecondaryLoop is an interface to achieve better control of the execution flow in Swing and AWT programs.

java.awt.SecondaryLoop is an interface created in Java 7 to simplify the execution of tasks in the background without blocking the thread that responds to UI events.

3 questions
7
votes
1 answer

SecondaryLoop instead of SwingWorker?

From the documentation for SecondaryLoop, it is not clear when you should use this new feature instead of a SwingWorker, a few examples of interesting cases would be useful.
Rhangaun
  • 1,430
  • 2
  • 15
  • 34
3
votes
2 answers

SwingWorker for Both Output & Work, or 1 Each?

Currently I always create a SwingWorker to do my actual work, and another to process the output via a PipedReader. I'd love to combine the two, but I just don't see an easy way to do it, in my situation. Given that I: Have a pre-made object that…
Sheriff
  • 495
  • 4
  • 16
-1
votes
2 answers

"GUI while loop"

Okay, I have a code that looks like this: public class Test { private JPanel dummy; public checker() { dummy = new JPanel(); dummy.setVisible(false); dummy.addComponentListener(new ComponentAdapter() { @Override …
Karlovsky120
  • 6,212
  • 8
  • 41
  • 94