Week 11

 


The pictures are out of order, but the first picture is so that the clock refreshes every 1000 milliseconds (1 sec). The second picture is the beginning of the code Where we put the clock constructor we set the background layout and font so it looks they way we want it. Then using the "SimpleDateFormat" we set what the format of the time, day and date should look like. After we have the format we create and add the labels to the clock. and then lastly, we call the setTime method. The set time does exactly as it says and sets the time. We get the instance of the calendar and get the time for each (time, day, and date). 

Picture of the clock that was made


Citation:

Java Clock App 🕓 - Youtube. https://www.youtube.com/watch?v=U63PV3u4aeQ.


Comments

Popular posts from this blog

Week 9

Week 10

Week 11