Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- button.addActionListener(this);
- @Override
- public void actionPerformed(ActionEvent e) {
- if (e.getActionCommand().equals("btn"))
- Animation();
- }
- Animation() {
- if(!playing) {
- playing = true;
- Thread.sleep(speed);
- playing = false;
- }
- }
Add Comment
Please, Sign In to add comment