FileDocCategorySizeDatePackage
Application.javaAPI DocExample4578Tue Mar 20 16:43:42 GMT 2001None

Application

public class Application extends Frame

Fields Summary
private static final int
H
private static final int
W
private TextField
theinput
private TextArea
theoutput
private Transaction
thetrans
private Account
theaccount
Constructors Summary
public Application()

 

          //constructor for Application
      
        setLayout(null);  //nullify the default layout manager so we can place things ourself
        setSize(W, H);
        setTitle("Iternational Bank of George");
        Font font = new Font("Monospaced",Font.PLAIN,12); //create a font for input and output


        // build the input field and add to Frame
        theinput = new TextField();          // create an input field
        theinput.setBounds(10,H-50,W-20,40); //set its co-ordinates within the frame
        theinput.setFont(font);              //set the font 
        add(theinput);                       //add theinput field to the frame
        theinput.addActionListener(thetrans);//add a listener to listen for a transaction event

        // build the output area and add to the frame
        theoutput = new TextArea(10,40);      //create a text area with dimensions
        theoutput.setBounds(10,30,W-20,H-100);//set its co-ordinates within the frame
        theoutput.setFont(font);              //set the font
        add(theoutput);                       //add the output area to the frame

       
Methods Summary