download and try the "V1.2.2" release candidate.
that will help drawString() somewhat when you are using PrintJob on win32.

Go to http://java.sun.com/products and look under early access releases.

Although I don't think you are trying to cast to a G2D, you are just noticing
that in fact what you are passed is a G2D, I have an observation here.
When using the 1.1 printing API (on Java 2) you shouldn't assume you will
be passed a Graphics2D in your paint() methods. But the implementation
in 1.2 on win32 happened to hand you one, which you are supposed to treat
as a Graphics.
You don't get handed a G2D on Solaris with 1.2 and 1.2.2 now fixes that
bug for win32.
All this really means in practice is that the 1.1 printing API is limited
to what is possible with a JDK 1.1.x Graphics instance.

To use 2D specific functionality when printing you need to use the
2D printing API.

-phil.

> X-Accept-Language: en
> Date: Wed, 23 Jun 1999 16:25:17 -0600
> From: john poole <[EMAIL PROTECTED]>
> Subject: [JAVA2D] Super class access
> To: [EMAIL PROTECTED]
>
> 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".

Reply via email to