Hello, guys in I am showing you the easiest method to show the date and time in your frame on your Jlabels.
I am providing my youtube video by this you can easily understand the concept.
After watching this video you can completely understand the concept clearly and if not then don’t hesitate to contact me you can comment down below or contact me through my website go visit my website softcore production and you can also download the source code of this and also for other projects.

Here is the video follow this and you will get how to use date and time in java.

After watching this video you understand the concept still I provide the source code for your help.
Also can visit my website.

Here is the Source code for Date:

    void showdate(){
        Date d = new Date();
        SimpleDateFormat s = new SimpleDateFormat("dd-MM-yyyy");

Here is the source code for Time:

void showtime(){
        new Timer(0, new ActionListener(){
            public void actionPerformed(ActionEvent e) {
                Date d = new Date();
                SimpleDateFormat s = new SimpleDateFormat("hh:mm:ss");

After this must paste the function name in the public section otherwise your program will run but nothing will show.
Must put the function name in public section.

I hope you understand the concept clearly and still not get the point then you can contact me my social media handles are below:

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart