SHARE
TWEET

Untitled

a guest Nov 15th, 2012 9 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top