In this article, we shall be animating the applet window with a 1-second delay. The idea is to display the system time of every instance.
Here 6 seven-segment displays are created using the Java Applet library to print the system time in HH:MM:SS format. Each segment of the seven-segment display, numbered as follows can be lit in different combinations to represent the numbers 0-9.
We have 6 seven-segment display for displaying the time in HH:MM:SS pattern. Each segment numbered as the following can be lit in different combinations to represent the numbers 0-9.
We can assume every single segment as 1 bit so (0-9) 10 number can make 10 different combinations.
e.g. if we want to display 0 we should lit-up the segments 0, 1, 2, 3, 4, 5. So this combination will make the number (2^0 | 2^1 | 2^2 | 2^3 | 2^4 | 2^5) = 63.
Below is the implementation of the above approach:
- Java Applet | How to display an Analog Clock
- Android | How to display Analog clock and Digital clock
- Java Applet | Digital Stopwatch
- Java Applet Basics
- Draw a Polygon in Java Applet
- Draw a Smiley in Java Applet
- Draw a Chessboard in Java Applet
- Difference between a Java Application and a Java Applet
- Draw an Olympic Symbol in Java Applet
- Draw a ellipse and a rectangle in Java Applet
- Java Applet | Draw a line using drawLine() method
- Java Code for Moving Text | Applet | Thread
- Java Applet | Implementing Flood Fill algorithm
- Java Clock withZone() method in Java with Examples
- Java Clock tickMinutes() method in Java with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.