📅  最后修改于: 2022-03-11 14:52:05.555000             🧑  作者: Mango
JButton b = new JButton("push me");
b.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
//your actions
}
});