Live clock in Java Application
<p>I have done :</p>

<pre><code>import java.util.Timer;

public class Time
 {
 public static java.util.Date getDate()
 {
     java.util.Date date = new java.util.Date();
    return date;         
 }

 public static java.text.SimpleDateFormat getFormat()
 {
     java.text.SimpleDateFormat format = new  java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
     return format;
 }
 }
     ..... JLabel lblNewLabel_4 = new    JLabel((Time.getFormat().format(Time.getDate())));
            lblNewLabel_4.setHorizontalAlignment(SwingConstants.CENTER);
            lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 15));
            lblNewLabel_4.setBounds(521, 13, 174, 28);
            panelMain.add(lblNewLabel_4);....
</code></pre>

<p>I want to make Jlabel which will show live date i tried this but obviously it doesnt work .</p>