The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

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.

Message:

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 sun.awt.windows.WGraphics extends SunGraphics2D implements PixelDrawPipe, PixelFillPipe, TranslateablePipe, SimpleRenderPipe, TextPipe, DeviceClipping





Replies:

Sponsored Links



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