![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 16.12.2020 16:40, dimontsho4717
Write a method that draws a circle and a square that is centered in a DrawingPanel. The method will take in the width and height (they are the same for both the circle and square) and a Graphics object as parameters
IN java
current code: turn it into a method along with the main method
import java. awt.*;
public class Graphics {
static final int WIDTH = 300;
static final int HEIGHT = 200;
public static void drawGraphics () {
}
public static void main(String []args) {
DrawingPanel2 draw = new DrawingPanel2(WIDTH, HEIGHT); // Make a DrawginPanel2 of size 300 by 200.
Graphics2D g = draw. getGraphics(); // gets graphics from DrawingPanel so you can draw
g. setColor(Color. RED);
g. fillRect(45, 30, 200, 150);
g. setColor(Color. BLUE);
g. fillOval(70, 30, 150, 150);
}
}
![answer](/tpl/images/cats/otvet.png)
Answers: 1
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 16:20, Aleja9
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 16:00, cravens511peeelg
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
![image](/tpl/images/cats/informatica.png)
Do you know the correct answer?
Write a method that draws a circle and a square that is centered in a DrawingPanel. The method will...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 24.08.2019 12:50
![Konu](/tpl/images/cats/geografiya.png)
![Konu](/tpl/images/cats/istoriya.png)
History, 24.08.2019 12:50
![Konu](/tpl/images/cats/mat.png)
Mathematics, 24.08.2019 12:50
![Konu](/tpl/images/cats/fizika.png)
Physics, 24.08.2019 12:50
![Konu](/tpl/images/cats/mat.png)
Mathematics, 24.08.2019 12:50
![Konu](/tpl/images/cats/istoriya.png)
History, 24.08.2019 12:50
![Konu](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 24.08.2019 12:50
![Konu](/tpl/images/cats/fizika.png)