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);
}
}
Answers: 1
Computers and Technology, 22.06.2019 22:50, cheyennecarrillo14
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
Computers and Technology, 24.06.2019 07:00, jared2461
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
Write a method that draws a circle and a square that is centered in a DrawingPanel. The method will...
Mathematics, 08.02.2020 00:40
History, 08.02.2020 00:40
Mathematics, 08.02.2020 00:40
Physics, 08.02.2020 00:40