Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Graphics object is very versatile and used for doing most of the drawing and gra

ID: 665985 • Letter: G

Question

Graphics object is very versatile and used for doing most of the drawing and graphical representation in a program. though: where do you normally use the Graphics object? Graphics object is very versatile and used for doing most of the drawing and graphical representation in a program. though: where do you normally use the Graphics object? Graphics object is very versatile and used for doing most of the drawing and graphical representation in a program. though: where do you normally use the Graphics object?

Explanation / Answer

Graphics object is mainly used for drawing text lines, rectangles, ovals and picture.

Graphics object is mainly use to create GUI components and Applets

Graphics object is automatically created for us by JPanel and its used to send a messages to graphics class

Example of graphics messages are

drawLine()

drawRect()

drawRoundRect()

we cant automatically generate a graphics objects so you must rely on JPanel doing it for you.

Drawing functions use a graphics object as a common parameter when drawing to windows and images