Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- public class ColorWheel {
- public static void main (String[] args) {
- //create graphical window with dimensions 512 (w) x 512 (h)
- DrawingPanel ColorWheel = new DrawingPanel(512, 512);
- Graphics circle = ColorWheel.getGraphics();
- circle.drawOval (0, 0, 512, 512);
- for (int i = 1; i <= 360; i++) {
- Color c = Color.getHSBColor(i, 0.0f, 0.5f);
- circle.fillArc(0, 0, 512, 512, i - 1, 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement