I have 2 comboboxes and I need to make it so that when certain options are selected from the drop down list, certain results are outputted. How do I associate certain string variables or objects with multiple combobox selections. I'm not asking you to do my homework for me. Just need pointing in the right direction.

```
    public class gui extends JFrame implements ActionListener{

    String[] colour1 = {"red", "blue", "green", "orange", "brown","white", "black", "yellow", "purple", "pink"};
        String[] colour2 = {"red", "blue", "green", "orange", "brown","white", "black", "yellow", "purple", "pink"};

        JComboBox combo1 = new JComboBox(colour1);
        JComboBox combo2 = new JComboBox(colour2);

        JLabel message = new JLabel(); 
        JFrame frame = new JFrame();
        JPanel panel = new JPanel(new GridLayout(0, 1));

    public gui() {

         panel.add(combo1);
        panel.add(combo2);
        panel.add(message);
        frame.add(panel);
}

```

I'm using actionPerformed to catch the users input, and then output specific results. At the moment it only takes the value of one combobox and outputs a string. How do i make it take 2.

```
public void actionPerformed(ActionEvent e){
           if(e.getSource() == combo1){
               JCombobox cb = (JComboBox)e.getSource();
           String colours = (String) cb.getSelectedItem();

           switch(colours){
           case "red": message.setText("");
               break;
           case "blue": message.setText("");
               break;
           case "green": message.setText("");
               break;
           case "pink": message.setText("");
               break;
           case "purple":message.setText("");
               break;
           case "white": message.setText("");
               break;
           case "black": message.setText("");
               break;
           case "brown": message.setText("");
               break;
           case "orange": message.setText("");
               break;
           case "yellow": message.setText("");
               break;
           default: message.setText("");
           }
        }
    }

```