Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.print.PageFormat;
import java.awt.print.PrinterJob;

public class Main {
    public static void main(String[] argv) throws Exception {

        PrinterJob pjob = PrinterJob.getPrinterJob();

        PageFormat pf = pjob.defaultPage();
        pf.setOrientation(PageFormat.LANDSCAPE);

        pf = pjob.pageDialog(pf);
    }
}