title: How to load already instantiated JComboBox with data in Java?
body: <p>I have a Swings GUI which contains a JComboBox and I want to load data into it from the database.</p>
  
  <p>I have retrieved the data from the database in a String Array. Now how can I populate this String array into the JComboBox</p>
  
  <p>EDITED====================================================================</p>
  
  <p>In actual, the JComboBox is already instantiated when the java GUI is shown to the user. So I can't pass the Array as a paramter to the constructor.</p>
  
  <p>How can I populate the already instantiated JComboBox?</p>
  
  <p>The following is the code that is Nebeans generated code.</p>
  
  <pre><code>jComboBox15 = new javax.swing.JComboBox();
  
  jComboBox15.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "12" }));
  
  jComboBox15.setName("jComboBox15");
  </code></pre>
  
  <p>Can I set another ComboBoxModel to the above jComboBox?</p>