1-a.)a filled rectangle with corner point(45, 20) and size 100 by 50
-g.drawRectangle(45, 20, 100, 50)
b.)a line segment with end points(20, 20) and (100, 100)
-g.drawSegment(20, 20, 100, 100)
c.)a circle with center point(100, 100) and radius 50
-g.drawCircle(150, 150, 50, 50)
d.)a triangle with vertices (100, 100), (50, 50), and (200, 200)
-g.drawTriangle(100, 100, 50, 50, 200, 200)
2.)describe the design of a program that displays a filled blue rectangle on a red background
-The program uses a modified version of the have added a paintComponent method that draws a blue regtangle containing a red text message when the window opens and whenever it is refreshed. The paintComponent methid first calls the same method in the superclass, using the reserved word super. The reason is that the method in the superclass paints the background of the panel.
3.)how does one compute the center point of a panel
-The method getWidth() and getHight() return the current width and hight of a panel, respectively. It will compute the center point of a panel. If the methods are called before the window is opened, they return a default value of 0.
4.)list the three properties of a text font
-color, font size, font style