@@ -0,0 +1,1569 @@
+package hw5;%0A%0Aimport java.awt.Color;%0Aimport java.awt.Font;%0Aimport java.awt.Frame;%0Aimport java.awt.Graphics;%0Aimport java.awt.event.WindowAdapter;%0Aimport java.awt.event.WindowEvent;%0Aimport java.util.GregorianCalendar;%0Aimport java.util.concurrent.TimeUnit;%0A%0Apublic class Hw5 extends Frame %7B%0A%09%0A%09GregorianCalendar now;%0A%09%0A%09public Hw5() // constructor%0A    %7B%0A        setTitle(%22HW5 Clock%22);%0A        setSize(500, 500);%0A        setBackground(Color.cyan);%0A        setForeground(Color.black);%0A        addWindowListener(new WindowAdapter() %7B%0A%0A            public void windowClosing(WindowEvent e) %7B%0A%0A                System.exit(0);%0A            %7D%0A        %7D);%0A        now = new GregorianCalendar();%0A        setVisible(true);%0A        %0A        turnClock();%0A    %7D%0A%0A%09public void turnClock () %7B%0A%09%09while (true) %7B%0A%09%09%09try %7B%0A%09%09%09%09now = new GregorianCalendar();%0A%09            requestFocus();%0A%09            repaint();%0A%09            TimeUnit.SECONDS.sleep(1);%0A%09%09%09%7D catch (Exception e) %7B%0A%09%09%09%09System.out.println(%22Error%22 + e);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09%0A    public void paint(Graphics g) %7B%0A%0A        g.setColor(Color.blue);%0A        Font f = new Font(%22Chalkboard%22, Font.BOLD, 30);%0A        g.setFont(f);%0A        g.drawString(now.get(GregorianCalendar.MONTH) + %22/%22 + now.get(GregorianCalendar.DATE) + %22/%22 + now.get(GregorianCalendar.YEAR), 180, 200);%0A        g.drawString(now.get(GregorianCalendar.HOUR) + %22:%22 + now.get(GregorianCalendar.MINUTE) + %22:%22 + now.get(GregorianCalendar.SECOND), 180, 250);%0A        %09%0A%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A    %09new Hw5(); // construct and execute%0A        %0A    %7D%0A%7D%0A

Add hw5