This is a basic access modifier issue. PrintQuality's [int] constructor is PROTECTED, so only a subclass of PrintQuality, OR another class within the javax.print.attribute.standard package may access that protected constructor.
The [int] constructor for OrientationRequested is also protected, and you have the same issues with it as you do with PrintQuality as above. Rob ----- Original Message ----- From: Eric Kolotyluk <mailto:[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 3:41 PM Subject: [JAVA2D] Compiling Problems with Printing Attributes Why does the compiler find a problem with this? I can't seem to use the defined constants cut and pasted from the API web pages, or even a literal integer. I do this sort of thing all the time with constants? I cannot see any problem with the constuctors. Any help would be appreciated. Cheers, Eric import javax.print.attribute.*; import javax.print.attribute.standard.*; // much more code OrientationRequested orientation = new OrientationRequested(OrientationRequested.LANDSCAPE); attributeSet.add((Attribute)orientation); PrintQuality printQuality = new PrintQuality(2); attributeSet.add((Attribute)printQuality); // much more code javac CinPrintFrame.java CinPrintFrame.java:217: cannot resolve symbol symbol : constructor OrientationRequested (javax.print.attribute.standard.OrientationRequested) location: class javax.print.attribute.standard.OrientationRequested new OrientationRequested(OrientationRequested.LANDSCAPE); ^ CinPrintFrame.java:221: PrintQuality(int) has protected access in javax.print.attribute.standard.PrintQuality PrintQuality printQuality = new PrintQuality(2); ^ =========================================================================== 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".