Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JFrame;
- /**
- This program shows a clock face.
- */
- public class ClockDriver
- {
- private static final int FRAME_WIDTH = 300;
- private static final int FRAME_HEIGHT = 350;
- public static void main(String[] args)
- {
- JFrame frame = new JFrame();
- frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
- frame.setTitle("Analog clock");
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- final ClockView clock = new ClockView(FRAME_WIDTH,FRAME_HEIGHT);
- clock.setTime(8,20);
- frame.add(clock);
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement