OK, make me a lier ;-). I just recompiled with DocFlavor and Attributes null and it worked. Now I owe you a beer too.

I must have mistaken another compiler error at the time for that one.

Thanks, it simplifies my code, but now I learned how to create a DocFlavor.

Jennifer gave me a solution on the array issue and now my code works.  Again, It's great to have some experts around.

Unfortunately the API doc'n doesn't say anything about an array, it just says `values'. If the API doc'n used Object[] instead of just Object it would be more clear on this point.

One more time, are there any ways to get a GraphicsContfiguration for a printer or printerJob?

Cheers, Eric

Phil Race wrote:
Sorry Phil, the compiler wouldn't let me use null for the DocFlavor.
    

It should. I don't see how the compiler could object to it.

  
When I run the program it throws classCastException at the first line of
code (but could anywhere else in the statement). Given
getSupportedAttributeValues returns (object) I can't compile the code
any other way - can I?
    

I think you'll find the return value is an array.
The javadoc for getSupportedAttributeValues tells you the types of return
values and how to deal with it.

-phil.

  

Reply via email to