English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I set up GregorianCalendar so that I have two methods, minute, and hour. I have also created a Graphics 2D program that looks like a clock with an hour hand and minute hand. How do I get the hour hand and minute hand to move to the corrrect area on the clock without writing 72 if statements? Is their a way to use angles somehow? (I used drawString to draw the minute and hour hands.) Thanks

2007-03-17 14:31:34 · 1 answers · asked by allan3177 1 in Computers & Internet Programming & Design

1 answers

Yes, there is a great example using angles, and best of all, it came with the JDK (since 1.0, I think...).

Go to where you installed the JDK and look for the demo directory. Specifically, look for jdk***/demo/applets/clock

2007-03-18 17:40:07 · answer #1 · answered by vincentgl 5 · 0 0

fedest.com, questions and answers