Java Combo Box and MySql database
<p>I am currently using netbeans GUI drag and drop form, i have a combobox, and i want the combobox value to change based on data received from a database. The other textboxes are receiving their data correcly, the main problem is with the combobox.</p>

<pre><code>   String x = tI.getStatus();

   if(x == "Assigned"){
       cboStatus.setSelectedIndex(0);
   }
   else if(x == "In progress"){
       cboStatus.setSelectedIndex(1);
   }
   else if (x == "Pending"){
       cboStatus.setSelectedIndex(2);
   }
   else if(x == "Completed"){
       cboStatus.setSelectedIndex(3);
   }
</code></pre>

<p>can anyone tell me how to change the index of the combo box based on data received from database. thanks.</p>
