PrintRequestAttributeSet dialogAttrs,
Window owner)
{
if (GraphicsEnvironment.isHeadless()) {
dialogResult = SETUP_ERROR;
throw new HeadlessException();
}
if (owner instanceof Frame) {
printDialog = new JDialog((Frame)owner, "Print", true, gc);
} else if(owner instanceof Dialog) {