I
Ike
I want to populate a JComboBox with Objects like the following:
class MyThings{
public int myint;
public String mystring;
}
Suppose I have an ArrayList of these things. I put the mystring Strings into
the JComboBox, which then gets sorted. However, when a selection is made in
the JCombobox, I want to retrieve the myint values (note - the myint values
are unique to each element, the mystring values may not be, i.e. it is much
like a relational database record).
Any idea how best to accomplish this? Thanks Ike
class MyThings{
public int myint;
public String mystring;
}
Suppose I have an ArrayList of these things. I put the mystring Strings into
the JComboBox, which then gets sorted. However, when a selection is made in
the JCombobox, I want to retrieve the myint values (note - the myint values
are unique to each element, the mystring values may not be, i.e. it is much
like a relational database record).
Any idea how best to accomplish this? Thanks Ike