Graphics Object : Java Glossary

go to home page G words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
Graphics Object
The Graphics class is abstract. It is just a collection of specifications for low-level drawing methods. The graphics object also contains a reference to the area of ram where the bit image will be constructed and it also contains the current clipping region. It is used for all types of painting including placing components, canvas drawing, and laying out text.

The most often use the Graphics object is as a parameter to your paint, paintComponent or print method. You often cast the abstract Graphics to an actual Graphics2D object to access additional methods. Have a look at the Screws application to understand the basics of drawing.

Sun’s Javadoc on the Graphics class : available:
Sun’s Javadoc on the Graphics2D class : available:
Sun’s Javadoc on the GeneralPath class : available:
Sun’s Javadoc on the Path2D class : available:
Path2D is available in JDK 1.6+.
Sun’s Javadoc on Graphics2D.addRenderingHints : available:
Sun’s Javadoc on the clearRect method : available:
Sun’s Javadoc on the drawImage method : available:
Sun’s Javadoc on the drawPolygon method : available:
Sun’s Javadoc on the drawString method : available:
the Graphics. drawString method behaves differently from other drawing methods. Usually the x,y is the upper left corner. For drawString, it is the left end of the string baseline.
Sun’s Javadoc on the fillRect method : available:
Sun’s Javadoc on the setClip method : available:
Sun’s Javadoc on Graphics2D.setTransform : available:

CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.61] Spread the Net
You are visitor number 9,728.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/graphicsobject.html J:\mindprod\jgloss\graphicsobject.html