I have a Swings GUI that contains a JComboBox, and I want to load data from a database into it.
I got the data from the database in a String Array. Now how can I populate this String array in a JComboBox
EDITED =================================================== =====================
In fact, a JComboBox is already created when the user interface GUI is displayed. Therefore, I cannot pass an array as a parameter to the constructor.
How can I populate an already created JComboBox?
Below is the code that is generated by the sky.
jComboBox15 = new javax.swing.JComboBox();
jComboBox15.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "12" }));
jComboBox15.setName("jComboBox15");
Is it possible to install another ComboBoxModel for the above jComboBox?