Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR 217 (Maintenance Release)

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 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 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.
 

Uses of Graphics in java.awt.image
 

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


JSR 217 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 217 specification.