if (ae.getSource() == createBut)
{
// THIS LINE NEEDS CHANGING IF CONSTRUCTOR CHANGES
A1 = new BankAccount(T1.getText(), Integer.parseInt(T2.getText()));
T1.setText("");
T2.setText("");
T3.setText("");
T4.setText("Account created");
for(int i=0; i<100000000; i++); // delay loop
T4.setText("");
store[storeCounter] = A1;
storeCounter++; // updates the index for storing next object
}
if (ae.getSource() == dispNextBut)
{
T1.setText(store[displayCounter].getName());
// ADD CODE TO DISPLAY ACCOUNT NUMBER AND BALANCE
T4.setText("");
displayCounter++; // updates the index for displaying next object
// ADD CODE TO CHECK FOR END OF ARRAY
// OTHERWISE PROGRAM WILL EVENTUALLY FAIL
}