JSR-62 (Final)

Uses of Class
java.awt.Graphics

Packages that use Graphics
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images. 
java.awt.image Provides classes for creating and modifying images. 
 

Uses of Graphics in java.awt
 

Subclasses of Graphics in java.awt
 class Graphics2D
          This Graphics2D class extends the Graphics class to provide more sophisticated control over graphics operations.
 

Methods in java.awt that return Graphics
abstract  Graphics Graphics.create()
          Creates a new Graphics object that is a copy of this Graphics object.
 Graphics Graphics.create(int x, int y, int width, int height)
          Creates a new Graphics object based on this Graphics object, but with a new translation and clip area.
abstract  Graphics Image.getGraphics()
          Creates a graphics context for drawing to an off-screen image.
 Graphics Component.getGraphics()
          Creates a graphics context for this component.
 

Methods in java.awt with parameters of type Graphics
 void ScrollPane.printComponents(Graphics g)
          Prints the component in this scroll pane.
 void Container.paint(Graphics g)
          Paints the container.
 void Container.update(Graphics g)
          Updates the container.
 void Container.print(Graphics g)
          Prints the container.
 void Container.paintComponents(Graphics g)
          Paints each of the components in this container.
 void Container.printComponents(Graphics g)
          Prints each of the components in this container.
 void Component.paint(Graphics g)
          Paints this component.
 void Component.update(Graphics g)
          Updates this component.
 void Component.paintAll(Graphics g)
          Paints this component and all of its subcomponents.
 void Component.print(Graphics g)
          Prints this component.
 void Component.printAll(Graphics g)
          Prints this component and all of its subcomponents.
 void Canvas.paint(Graphics g)
          This method is called to repaint this canvas.
 

Uses of Graphics in java.awt.image
 

Methods in java.awt.image that return Graphics
 Graphics BufferedImage.getGraphics()
          This method returns a Graphics2D, but is here for backwards compatibility.
 


JSR-62 (Final)

Java and Java 2D are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Copyright 1993 - 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All Rights Reserved.
Use of this specification is subject to this license.