-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathMicrosoft_Windows_10_Logo.java
More file actions
37 lines (33 loc) · 1023 Bytes
/
Microsoft_Windows_10_Logo.java
File metadata and controls
37 lines (33 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.awt.Color;
import javax.swing.JFrame;
public class TurtleGraphics {
public static void main(String[] args) {
Turtle turtle = new Turtle();
turtle.setPenSpeed(1);
turtle.setScreenColor(Color.BLACK);
turtle.penUp();
turtle.goTo(-50, 60);
turtle.penDown();
turtle.setColor(new Color(0, 173, 239));
turtle.beginFill();
turtle.goTo(100, 100);
turtle.goTo(100, -100);
turtle.goTo(-50, -60);
turtle.goTo(-50, 60);
turtle.endFill();
turtle.setColor(Color.BLACK);
turtle.goTo(15, 100);
turtle.setColor(Color.BLACK);
turtle.setWidth(10);
turtle.goTo(15, -100);
turtle.penUp();
turtle.goTo(100, 0);
turtle.penDown();
turtle.goTo(-100, 0);
JFrame frame = new JFrame();
frame.add(turtle);
frame.setSize(400, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}