alertEditName.setModel(nameListModel);
alertEditName.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if ("comboBoxChanged".equals(e.getActionCommand())) {
Vulnerability v = getVulnerability((String)alertEditName.getSelectedItem());
if (v != null) {
if (v.getDescription() != null && v.getDescription().length() > 0) {
alertDescription.setText(v.getDescription());
}
if (v.getSolution() != null && v.getSolution().length() > 0) {
alertSolution.setText(v.getSolution());
}
if (v.getReferences() != null) {
StringBuffer sb = new StringBuffer();
for (String ref : v.getReferences()) {
sb.append(ref);
sb.append("\n");
}
alertReference.setText(sb.toString());
}