The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 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.


Implementing interfaces

Posted by Matt Gerrans on November 27, 2001 at 4:46 AM


Look at the ExecTester I posted earlier, or the nifty label event-handling example that Jay posted. These both implement interfaces for the listeners in the same way as you do with an ImageObserver. This sort of thing is part and parcel to using Swing.

- mfg

> How do I implement an interface (ie, ImageObserver)? I have to pass an ImageObserver object as a parameter to Graphics' drawImage method, and ImageObserver is an interface. Does anyone have any suggestions (or code to start me off) on how I can implement ImageObserver? Do I create a constructor for it, or what? (See Question about Graphics drawImage method for more the original thread). Thnx in advance!
> Hiran


Sponsored Links

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