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);
                                        ^

Reply via email to