• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TextField input/output across classes

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot understand why the following applet won't work. It's supposed to accept a transaction amount from one of two TextFields (deposit or withdraw), change the account balance respectively, and display the new account balance. But nothing happens. It does compile (seemingly) fine.
What am I doing wrong?

and the BankAccount class is:

Thank you for any help.

(edited by Cindy to remove extra paste of TestAccount class)

[This message has been edited by Cindy Glass (edited December 14, 2001).]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note:
I obviously accidently pasted the first class twice. Sorry for any confusion.
(I fixed that - Cindy)
[This message has been edited by Cindy Glass (edited December 14, 2001).]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you are probably going to have a problem if you use an actionListener in this case. How will the listener know when the user is FINISHED entering the amount? Do you intend for the action to happen each time that a digit is entered? Each time that the TextField is clicked?
Perhaps you should consider adding a transaction button that the user can push to indicate that he is done typing and correcting his input amount.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic