Please Please Please

Im going out of my mind!

Im trying to select a person from a combo box, then after the selection their age is automatically set into a text box.

the thing is there are no people in the list until inputted onto the system which i have working.

i also have working getting the last inputted persons age, but this age is the same for all people when it shouldnt be.

i need to search the arraylist, match the name, then get the age. how?

Please Help!

[483 byte] By [Symb0la] at [2007-11-26 14:52:40]
# 1
> i need to search the arraylist, match the name, then get the age. how?Iterate over the list until you find an object with the correct name. Then get the age.Though a Map might be more useful.
CeciNEstPasUnProgrammeura at 2007-7-8 8:40:54 > top of Java-index,Java Essentials,Java Programming...
# 2

> > i need to search the arraylist, match the name,

> then get the age. how?

>

> Iterate over the list until you find an object with

> the correct name. Then get the age.

>

> Though a Map might be more useful.

Sorry for my lack of knowledge on this, but could you give me an example or some help on how to do this please?

Symb0la at 2007-7-8 8:40:54 > top of Java-index,Java Essentials,Java Programming...
# 3

> Im going out of my mind!

>

I too am going out of my mind!!!! :weird:

> Im trying to select a person from a combo box, then

> after the selection their age is automatically set

> into a text box.

>

> the thing is there are no people in the list until

> inputted onto the system which i have working.

>

> i also have working getting the last inputted persons

> age, but this age is the same for all people when it

> shouldnt be.

>

> i need to search the arraylist, match the name, then

> get the age. how?

>

> Please Help!

You can't expect someone to write the code for you if that has already not been done. I believe so, otherwise you'd have put in your code showing us what has been done from your part.

We expect more information if you expect help from us.

FUN_ONEa at 2007-7-8 8:40:54 > top of Java-index,Java Essentials,Java Programming...
# 4
Keep the name and age information together in a custom Object and then add the custom Object to the combo box. Something like this: http://forum.java.sun.com/thread.jspa?forumID=57&threadID=608684
camickra at 2007-7-8 8:40:54 > top of Java-index,Java Essentials,Java Programming...