JPBE018: Adding ActionListener to implement Reset button
530 بار بازدید -
4 سال پیش
-
Eclipse's auto-complete feature creates an
Eclipse's auto-complete feature creates an anonymous class of interface ActionListener for us.
resetBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
game.reset();
panel.repaint();
}
});
GitHub repo:
https://github.com/zhijunsheng/connec...
resetBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
game.reset();
panel.repaint();
}
});
GitHub repo:
https://github.com/zhijunsheng/connec...
4 سال پیش
در تاریخ 1399/09/12 منتشر شده
است.
530
بـار بازدید شده