Advertisement
Guest User

Untitled

a guest
Nov 15th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import java.awt.event.ActionEvent;
  2. import java.awt.event.ActionListener;
  3.  
  4. public class ClickListener_P12_3 implements ActionListener
  5. {
  6. public void actionPerformed(ActionEvent event)
  7. {
  8. System.out.print(event.getActionCommand()+
  9. " was clicked ");
  10. System.out.print(clickCount);
  11. System.out.print(" times.");
  12. System.out.println();
  13.  
  14. clickCount++;
  15. }
  16.  
  17. private int clickCount = 1;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement