Skip to content

Commit dda5491

Browse files
hansonrhansonr
authored andcommitted
Frame not necessary; shutdown does not prevent process.
But StateMachine is necessary.
1 parent a481198 commit dda5491

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

sources/net.sf.j2s.java.core/src/test/Test_Exec.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
package test;
22

3-
import java.awt.Font;
43
import java.util.HashSet;
54
import java.util.Set;
65
import java.util.concurrent.Executors;
7-
import java.util.concurrent.Future;
86
import java.util.concurrent.ScheduledExecutorService;
97

10-
import javax.swing.JFrame;
11-
128
import javajs.async.SwingJSUtils.StateHelper;
139
import javajs.async.SwingJSUtils.StateMachine;
1410

11+
/**
12+
* StateMachine ensures task is completed before shutdown is complete
13+
* @author hansonr
14+
*
15+
*/
1516
public class Test_Exec implements StateMachine {
1617

1718

@@ -25,9 +26,6 @@ public static void main(String[] args) {
2526
}
2627

2728
Test_Exec() {
28-
JFrame f = new JFrame();
29-
f.setSize(100,100);
30-
f.setVisible(true);
3129
helper = new StateHelper(this);
3230
helper.next(0);
3331
}

0 commit comments

Comments
 (0)