Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    IBM
    IBM is offline
    New Coder
    Join Date
    Jul 2002
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    IBM
    IBM is offline
    New Coder
    Join Date
    Jul 2002
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •