/* Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
This code is for educational purposes only. Use at own risk.*/

1. import java.awt.* ; 

2. import java.applet.* ; 

3. import java.awt.event.*; 

4.  

5. public class Timing 

6.     extends Applet 

7.     implements MouseListener 

8.

9.   Label lbl ; 

10.    

11.   public void 

12.   mouseClicked ( MouseEvent ev ) 

13.   { 

14.     long time = System.currentTimeMillis () ;   /*h*/ 

15.  

16.     lbl.setText ( time + "" ) ; 

17.   } 

18.    

19.   public void 

20.   init() 

21.   { 

22.     addMouseListener ( this ) ; 

23.  

24.     lbl = new Label ( "=================="+ Label.CENTER ) ; 

25.     add ( lbl ) ; 

26.  

27.     setBackground ( Color.orange ) ; 

28.     validate () ; 

29.   } 

30.    

31.   public void mousePressed(MouseEvent e) {} 

32.   public void mouseReleased(MouseEvent e) {} 

33.   public void mouseEntered(MouseEvent e) {} 

34.   public void mouseExited(MouseEvent e) {} 

35.

36.