hai is there is any way to change the list displayed in the combobox dynamically i want to change the whole list i have a combo box that displays the available fonts this list of fonts have to change as language changes (change of language is done using another combo box) can i assign a new list to display in the combo box hoping an immediate help
Joined: Jul 13, 2001
You first have to put your encapsulate your list in a objet of a class implementing ComboBoxModel and call the setModel method on the instance of JComboBox. W.
Joined: Jun 04, 2001
can u please eloberate this
Joined: Sep 28, 2000
hi, attach an item listener to the first combobox (displaying the languages). when the value gets changed it will call the itemchanged method. within this method you can reset the model of the second combo box. see the tutorial for detailed information (http://java.sun.com/docs/books/tutorial/uiswing/components/). chantal