-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMyDrawPanel.java
More file actions
39 lines (31 loc) · 924 Bytes
/
Copy pathMyDrawPanel.java
File metadata and controls
39 lines (31 loc) · 924 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 java.awt.Graphics;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class MyDrawPanel extends JPanel {
public void paintComponent(Graphics g){
// g.setColor(Color.white);
// g.fillRect(140, 50, 420, 420);
g.setColor(Color.orange);
g.fillRect(150, 60, 400, 400);
g.setColor(Color.black);
g.fillRect(150, 60, 3, 400);
g.fillRect(200, 60, 3, 400);
g.fillRect(250, 60, 3, 400);
g.fillRect(300, 60, 3, 400);
g.fillRect(350, 60, 3, 400);
g.fillRect(400, 60, 3, 400);
g.fillRect(450, 60, 3, 400);
g.fillRect(500, 60, 3, 400);
g.fillRect(550, 60, 3, 400);
g.fillRect(150, 60, 400, 3);
g.fillRect(150, 110, 400, 3);
g.fillRect(150, 160, 400, 3);
g.fillRect(150, 210, 400, 3);
g.fillRect(150, 260, 400, 3);
g.fillRect(150, 310, 400, 3);
g.fillRect(150, 360, 400, 3);
g.fillRect(150, 410, 400, 3);
g.fillRect(150, 460, 403, 3);
}
}