Subject | Re: HELP JCOMBOBOX |
---|---|
Author | tesanovic |
Post date | 2007-08-15T13:24:35Z |
--- In Firebird-Java@yahoogroups.com, "betoban2007" <betoban2007@...>
wrote:
JComboBox items are objects. Create object ComboItem:
class ComboItem
{
int id_car;
String nombre_car;
public String toString()
{
return nobre_car;
}
}
Fill your datapair in ComboItem and add that object to JComboBox.
Bye
wrote:
>Hi!
> I need to fill the items of jcombobox with the data of a table (int to
> id_car, String to nombre_car). Somebody can collaborate to me?
> thanks.
>
JComboBox items are objects. Create object ComboItem:
class ComboItem
{
int id_car;
String nombre_car;
public String toString()
{
return nobre_car;
}
}
Fill your datapair in ComboItem and add that object to JComboBox.
Bye