for (Town town : towns) {
jComboBox3.addItem(town.getName());
}
jComboBox3.addActionListener(new ActionListener() {
@Override
<BUG>public void actionPerformed(ActionEvent e) {
changeTown(towns.get(jComboBox3.getSelectedIndex()));
}</BUG>
});
initComponents();

for (Town town : towns) {
jComboBox3.addItem(town.getName());
}
jComboBox3.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (towns.size() > 0 && jComboBox3.getSelectedIndex() >= 0) {
changeTown(towns.get(jComboBox3.getSelectedIndex()));
}
}
});
initComponents();
