The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Simple Inheritance

Posted by Kishori Sharan on January 03, 2001 at 9:24 AM

The argument to paint method can take an object of Graphics class or its subclass. In fact , at run time an object of class WGraphics is passed to paint method. The class hierarchy is as follows. It's simply inheritance!!!

public java.lang.Object
public abstract java.awt.Graphics
public abstract java.awt.Graphics2D
public abstract sun.java2d.SunGraphics2D
public extends SunGraphics2D implements PixelDrawPipe, PixelFillPipe, TranslateablePipe, SimpleRenderPipe, TextPipe, DeviceClipping


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us