| Author |
TextField input/output across classes
|
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
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).]
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
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
Joined: Sep 29, 2000
Posts: 8521
|
|
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.
|
"JavaRanch, where the deer and the Certified play" - David O'Meara
|
 |
 |
|
|
subject: TextField input/output across classes
|
|
|