...

View Full Version : Jbuilder and Bank Application?



IBM
10-21-2002, 06:33 AM
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

IBM
10-21-2002, 09:55 PM
thanks...but I got it fixed already.
The help I recieved was overwhelming.

Nah..just joking, I understand that I was likely to get little or no help, it's difficult when you don't know which classes you have or methods etc..

So thanks anyway, I'll probably be back to posy more question on the chance that I do get some help.

bye:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum