-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathACircle.java
More file actions
28 lines (26 loc) · 760 Bytes
/
Copy pathACircle.java
File metadata and controls
28 lines (26 loc) · 760 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package assignment_10528808;
/**
*
* @author Mawutor
*/
import java.awt.*;
import javax.swing.JFrame;
public class ACircle extends Canvas {
public void paint( Graphics g ){
g.setColor(Color.green);
g.fillOval(0,0,200,200);
}
public static void main(String[] args){
JFrame mawutor = new JFrame("This is a circle");
mawutor.setSize(800,600);
mawutor.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ACircle psalms = new ACircle();
mawutor.add(psalms);
mawutor.setVisible(true);
}
}