String[] Channel= {"Admin","Customer","Receptionist","Logout"};
switchTo=new JComboBox(Channel);
switchTo.setBounds(1350,30,180,35);
switchTo.setFont(new Font("Tahoma", Font.PLAIN,20));
switchTo.setForeground(Color.BLACK);
titlePanel.add(switchTo);
switchTo.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
String value = (String) switchTo.getSelectedItem();
switch(value){
case "Admin":
frame.dispose();
new AdminDashBoard();
break;
case "Customer":
frame.dispose();
new CustomerDashBoard();
break;
case "Receptionist":
frame.dispose();
new ReceptionDashBoard();
break;
case "Logout":
frame.dispose();
new LoginWindow();
break;
}
}
});