Added analog clock II

This commit is contained in:
Robert Vokac 2024-01-20 15:10:38 +00:00
parent 4f4732fee6
commit f75c727817
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055

View File

@ -39,8 +39,8 @@ public class AnalogClock extends JPanel {
int hour = time.get(Calendar.HOUR_OF_DAY);
drawHand(g2d, side / 2 - 10, second / 60.0, 0.5f, Color.RED);
drawHand(g2d, side / 2 - 20, minute / 60.0, 2.0f, Color.BLUE);
drawHand(g2d, side / 2 - 40, hour / 12.0, 4.0f, Color.BLACK);
drawHand(g2d, side / 2 - 20, minute / 60.0 + second / 60.0 / 60.0, 2.0f, Color.BLUE);
drawHand(g2d, side / 2 - 40, hour / 12.0 + minute / 60.0 / 12 + second / 60 / 60 / 12, 4.0f, Color.BLACK);
// Draw clock numbers and circle
drawClockFace(g2d, centerX, centerY, side / 2 - 40);