KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > prevayler > demos > demo2 > gui > NewAccountFrame


1 package org.prevayler.demos.demo2.gui;
2
3 import org.prevayler.Prevayler;
4 import org.prevayler.demos.demo2.business.transactions.AccountCreation;
5 import javax.swing.*;
6 import java.awt.Container JavaDoc;
7
8 class NewAccountFrame extends AccountFrame {
9     
10     NewAccountFrame(Prevayler prevayler, Container JavaDoc container) {
11         super("New Account", prevayler, container);
12
13         setBounds(50,50,240,114);
14     }
15
16     protected void addButtons(JPanel buttonPanel) {
17         buttonPanel.add(new JButton(new OKAction()));
18     }
19     
20     private class OKAction extends RobustAction {
21
22         OKAction() {
23             super("OK");
24         }
25
26         protected void action() throws Exception JavaDoc {
27             _prevayler.execute(new AccountCreation(holderText()));
28             dispose();
29         }
30     }
31
32 }
Popular Tags