File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,6 @@ public boolean apply(Sketch sketch) {
119119 boolean untitled ;
120120
121121 PageFormat pageFormat ;
122- PrinterJob printerJob ;
123122
124123 // file, sketch, and tools menus for re-inserting items
125124 JMenu fileMenu ;
@@ -2760,15 +2759,11 @@ public void run() {
27602759 * Handler for File → Page Setup.
27612760 */
27622761 public void handlePageSetup () {
2763- //printerJob = null;
2764- if (printerJob == null ) {
2765- printerJob = PrinterJob .getPrinterJob ();
2766- }
2762+ PrinterJob printerJob = PrinterJob .getPrinterJob ();
27672763 if (pageFormat == null ) {
27682764 pageFormat = printerJob .defaultPage ();
27692765 }
27702766 pageFormat = printerJob .pageDialog (pageFormat );
2771- //System.out.println("page format is " + pageFormat);
27722767 }
27732768
27742769
@@ -2778,9 +2773,7 @@ public void handlePageSetup() {
27782773 public void handlePrint () {
27792774 statusNotice (_ ("Printing..." ));
27802775 //printerJob = null;
2781- if (printerJob == null ) {
2782- printerJob = PrinterJob .getPrinterJob ();
2783- }
2776+ PrinterJob printerJob = PrinterJob .getPrinterJob ();
27842777 if (pageFormat != null ) {
27852778 //System.out.println("setting page format " + pageFormat);
27862779 printerJob .setPrintable (textarea , pageFormat );
You can’t perform that action at this time.
0 commit comments