This Java Swing JComboBox is modified based on changes to the system configuration. In the example image, "Press to Select" is the case where nothing is selected and there is one "Test Unit" in the configuration, but "Press to Select" is displayed twice in the drop down. The additional "Press to Select" item behaves like item 0 so it is functional, but it looks crappy this way. Any ideas?
public class Controller extends javax.swing.JFrame implements Observer {
...
public void update(Observable o, Object arg) {
jComboBox.removeAllItems();
jComboBox.addItem("Press to Select");
String[] names = Configuration.getNames();
for (String n : names) {
jComboBox.addItem(n);
}
...