Name of JComboBox as string
Hi,
How can Iset name of JComboBox as string in the definition as String?
I get this name as String from my database.
I want to write something like:
String componentName= rs.getString("name");
JComboBox componentName =new JComboBox();
Thanks :)
[355 byte] By [
yael800a] at [2007-11-26 18:52:40]

I don't understend,
in my DB I have:
name column type as String
|name|
usersCombo
animalsCombo
You mean: ?
Map<JComboBox, String> mapCombos = new HashMap<JComboBox, String>();
mapCombos.put(new JComboBox(), rs.getString("name"));
[code]
Then, How can I thak one of this combo?
Like this? so I must to save this names also?
[code]
JComboBox = mapCombos.get(specificName);
I have this:
mapCombos.put(rs.getString("name"), new JComboBox());
I whant to set renderer or font.. to every JComboBox
How to take them (one by one) to set them renderer?
for(int i = 0; i< mapCombo.size(); i++)
{
comboMap.get(name).setRenderer(new MyComboRenderer());
}
How to get this name? I can't get the key name from the combobox, so How I will have this name to get the specipic combo?