| Author |
"add" method
|
Candy Bortniker
Ranch Hand
Joined: Mar 17, 2003
Posts: 123
|
|
I have a program that is suppose to allow the user to press enter to move to the next textfield. My instructor says I need a "add" method that will put a listener into the vector. My problem is that I don't know really how to write this statement. There is a lot of code to this and I'm not sure how much you need to see to give me any help. This is in LimitedTextContainer: Here is the driver program:
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
If I understand what you are saying you will need something like... Then calling this somewhere in your code would be Without knowing what Listener needs added and to what Vector I took a guess at the Vector and made up a Listener name. I think the point your instructor is trying to make is code re-use. So instead of issuing the Vector's add() method whenever you need it, you would just call a single function that would do the same thing. However, this seems like calling an extra method because a Vector already has an add() method. So it kind of me. [ March 01, 2004: Message edited by: Gregg Bolinger ]
|
 |
 |
|
|
subject: "add" method
|
|
|