Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- public class ClickListener_P12_3 implements ActionListener
- {
- public void actionPerformed(ActionEvent event)
- {
- System.out.print(event.getActionCommand()+
- " was clicked ");
- System.out.print(clickCount);
- System.out.print(" times.");
- System.out.println();
- clickCount++;
- }
- private int clickCount = 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement