Hi John
I don't think what you're trying to do is possible. Method dispatch is
always done according to the run-time class of the receiver, no matter what
you cast it to. (In other words, all Java methods are virtual, to use C++
parlance.) The exception is for static methods, which are dispatched, well,
statically, but that doesn't help you.
Having said all that, I seem to remember some did post a message here about
using the old PrintJob mechanism successfully. Have you checked the archives
at http://archives.java.sun.com/archives/java2d-interest.html? (Not that the
Search link ever works, and April and May seem to be missing, but you might
find it...)
Cheers,
Pete
--
Pete Cockerell
California, USA
http://216.102.89.91
----- Original Message -----
From: john poole <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 23, 1999 3:25 PM
Subject: [JAVA2D] Super class access
> I'm trying to get around my printing problems by using the old PrintJob.
This
> works except for drawString(), because there is the same method in
Graphics2D.
>
> Does anyone know how to use the method of the super class of an
object?
> I've tried casting to Graphics, but the exception I get is still from
> SunGraphics2D.
> Graphics is the super.super.super.super.super class of the PrintGraphics
that
> gets sent to my print method.
>
> John
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".