File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Calling a method of an object stored in a TreeMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Calling a method of an object stored in a TreeMap

Bob Bob

Joined: Mar 20, 2003
Posts: 8
Im doing a project for my college class that requires me to write an applet that will create and store Employees Objects. I have written an Employee class containing a getName method used to return en employee's name. I have also created a required TreeMap collection (name empObjects) used to store the employee objects that will be made. My problem is, I need to find a statement that will allow me to get an object from my empObjects collection, call the getName method, and place it within a textbox (named empName). I have tried several times but cannot come up with a good solution. I would appreciate any help.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Please do not post the same topic in multiple forums. I responded to this post here Using a class method of an object stored in a TreeMap .
Michael Morris

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link:
subject: Calling a method of an object stored in a TreeMap
It's not a secret anymore!