I have a bank Class,
and in my Main Java file,frame1, I am trying to deposit into a clients account.
but my code is wrong, I wonder if anyone can even help, seeing as how you don't know what classes
I have and so forth.
Wait...
I'll upload the .html documetnation.
The Url will be:
http://desciple5.netfirms.com/javadocs.html
This is my code for my deposit procedure.
void jBtnDeposit_actionPerformed(ActionEvent e)
{
if(jTxtFAmount.getText().equals(""))
{
jTxtArea.append("No amount added\n");
}
else
{
BankAccount depositInto = new BankAccount
(jTxtFName.getText(),
myBank.getAccountCounter(),
Double.parseDouble(jTxtFAmount.getText()));
depositInto.deposit(Double.parseDouble
(jTxtFAmount.getText()));
jTxtArea.append("Account Number: "+
depositInto.getAccountNumber()+ "\n" +
"Account Owner: " + depositInto.getOwnerName() + "\n" +
"Amount deposited: "+ Double.parseDouble
(jTxtFAmount.getText())+"\n"+
"Balance: " + depositInto.getBalance()+ "\n");
}
}
It keeps creating a new account each time, obviously it's becuase I'm using a constructor...but How
would I go about not using the constructor and depositing into a specific account ID?
thanks