< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java
Print this page
@@ -397,10 +397,14 @@
@Override
public final PrintJob getPrintJob(Frame frame, String doctitle,
JobAttributes jobAttributes,
PageAttributes pageAttributes) {
+ if (frame == null) {
+ throw new NullPointerException("frame must not be null");
+ }
+
if (GraphicsEnvironment.isHeadless()) {
throw new IllegalArgumentException();
}
PrintJob2D printJob = new PrintJob2D(frame, doctitle, jobAttributes, pageAttributes);
< prev index next >