public class BankAccountGUIApp
1: //BankAccountGUIApp.java
2: //Adapted from an example by Tony Sintes.
3: //Uses:
4: // BankAccountModel.java
5: // BankAccountView.java
6: // BankAccountController.java
7: //This Driver hooks the model and view together
8: //and then places the view into a frame for display.
10: import java.awt.event.WindowAdapter;
11: import java.awt.event.WindowEvent;
12: import javax.swing.JFrame;
15: public class BankAccountGUIApp
16: {
17: public static void main(String [] args)
18: {
19: BankAccountModel model = new BankAccountModel(10000.00);
20: BankAccountView view = new BankAccountView(model);
22: JFrame frame = new JFrame();
23: WindowAdapter wa = new WindowAdapter()
24: {
25: public void windowClosing(WindowEvent e)
26: {
27: System.exit(0);
28: }
29: };
30: frame.addWindowListener(wa);
31: frame.getContentPane().add(view);
32: frame.pack();
33: frame.show();
34: }
35: }