01: import javax.swing.JFrame;
02: 
03: /**
04:    A simulation of an automatic teller machine
05: */
06: public class ATMSimulation
07: {  
08:    public static void main(String[] args) 
09:    {  
10:       if (args.length == 0)
11:       {   
12:          System.out.println(
13:             "Usage: ATMSimulation propertiesFile");
14:          System.exit(0);
15:       }
16:       else 
17:       {
18:          try
19:          {
20:             SimpleDataSource.init(args[0]);
21:          }
22:          catch (Exception ex)
23:          {
24:             ex.printStackTrace();
25:             System.exit(0);
26:          }
27:       }
28: 
29:       JFrame frame = new ATM();
30:       frame.setTitle("First National Bank of Java");      
31:       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
32:       frame.pack();
33:       frame.show();
34:    }
35: }
36: