forked from vdt/Algorithmic-Trading-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
executable file
·43 lines (36 loc) · 1.12 KB
/
Main.java
File metadata and controls
executable file
·43 lines (36 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package TestJavaClient;
import java.awt.Component;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
/**
* Main.java
*
* Starts up the automated trading system and handles critical errors.
*
* @author gkoch
*
*/
public class Main {
// This method is called to start the application
public static void main (String args[]) {
@SuppressWarnings("unused")
Controller controller = new Controller();
}
// Handles strings and errors, do not change.
static public void inform( final Component parent, final String str) {
if( SwingUtilities.isEventDispatchThread() ) {
showMsg( parent, str, JOptionPane.INFORMATION_MESSAGE);
}
else {
SwingUtilities.invokeLater( new Runnable() {
public void run() {
showMsg( parent, str, JOptionPane.INFORMATION_MESSAGE);
}
});
}
}
// This function pops up a dlg box displaying a message based on what str is
static private void showMsg( Component parent, String str, int type) {
JOptionPane.showMessageDialog( parent, str, "IB Java Test Client", type);
}
}