i want to store the objects in jcombobox.but the display name in combo should be one of it's properties of that objects like name,id etc. This is same as value and text of select/option in html. can we do that in java?
As a default the JComboBox will call the toString method of the objects.. so you could write your own toString method and have it return the value of the variable.. You could also create your own ListCellRenderer...
Now,i want to display remote interfaces of EJB in JComboBox.we cant override toString() method in remote interfaces.So is there anyother way other than overriding toString() method. tell me abt ListCellRender in detail.
Thanks for ur help.I have written customized list renderer in which i have modified toString() method to my own remote Interface's getProperty() method. As iam displaying remote interfaces,for every renderer call,it calls Database to access the value.So is it advisable to list remote interfaces in JComboBox.