Java ComboBoxes dependent on another combobox
<p>I have an <code>ArrayList</code> of objects that I have used to populate a <code>ComboBox</code> (Managers) as shown below: </p>

<pre><code>testingPeople people = new testingPeople();
people.loadPeople();
ArrayList&lt;Person&gt; testing = new ArrayList&lt;Person&gt;();
testing = people.getManagerList();
for (int i=0; i &lt; testing.size(); i++) {
    jComboBox1.addItem(testing.get(i));
}
</code></pre>

<p>Now, I want to populate the second <code>ComboBox</code> (subordinates) based on the values selected in the 1st <code>ComboBox</code>. In the event handler, I have tried the following:</p>

<pre><code>if (jComboBox1.getSelectedItem().equals("Insert Name here")) {
    jComboBox2.addItem("it works!");
}
</code></pre>

<p>And, other variations but I'm still drawing a blank.</p>

<p>Can someone please enlighten me.</p>