Originally posted by Garion Winters:
Hi again, all.
I was having a minor problem, and wondered if someone could point me the right direction. Basically, within a GUI JFrame I want a button to pop up another dialog box, or what not. Then, I want that box to only be movable within the JFrame... if you move it out, it hides the portion that goes off. I guess this would make it a child window? Well, I am having trouble finding how to do this. Any places I should look, or examples I could see? Thanks again.
Originally posted by Drake Silver:
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?