ActionListener はインターフェイスですが、インスタンス オブジェクトを作成できるのはなぜですか?
JButton button = new JButton("Button1");
ActionListener me = new ActionListener(){
public void actionPerformed(ActionEvent ae){
JOptionPane.showMessageDialog(null,ae.getActionCommand());
}
};
button.addActionListener(me);
それとも他に何ですか?私はわかりません。私を助けてください。