I have a combobox with language menus on a Jframe , on selection of chinese from combo I have to call another action listener class ChineseButnListener. How can I correct this code?`
ActionListener actionListener = new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
ItemSelectable language = (ItemSelectable)actionEvent.getSource();
System.out.println(selectedString(language));
if(selectedString(language).equals("Chinese")){
// addActionListener(new ChineseButnListener());
}else
//addActionListener(new EnglishButnListener());
}
};
class ChineseButnListener implements ActionListener {
public void actionPerformed(ActionEvent evt) {
//
}
}
`