Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-21-2002, 06:33 AM   PM User | #1
IBM
New Coder

 
Join Date: Jul 2002
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
IBM is an unknown quantity at this point
Unhappy Jbuilder and Bank Application?

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
__________________
We all have souls, where do you want yours to go?

The little princess
Back from the dead
A Love Story
The only Hope / End Times
IBM is offline   Reply With Quote
Old 10-21-2002, 09:55 PM   PM User | #2
IBM
New Coder

 
Join Date: Jul 2002
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
IBM is an unknown quantity at this point
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
__________________
We all have souls, where do you want yours to go?

The little princess
Back from the dead
A Love Story
The only Hope / End Times
IBM is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:19 AM.


Advertisement
Log in to turn off these ads.