我在Jframe上有一个带有语言菜单的组合框,从组合中选择中文我必须调用另一个动作监听器类ChineseButnListener。我该如何更正此代码?`
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) {
//
}
}
`