COMP2396
Loading...
Searching...
No Matches
MyDrawPanel2.java
Go to the documentation of this file.
1import java.awt.*;
2import javax.swing.*;
3
4class MyDrawPanel2 extends JPanel {
5 public void paintComponent(Graphics g) {
6 int red = (int) (Math.random() * 256);
7 int green = (int) (Math.random() * 256);
8 int blue = (int) (Math.random() * 256);
9 g.setColor(new Color(red, green, blue));
10 g.fillOval(70, 70, 100, 100);
11 }
12}