I have a tablw which holds quite a lot of information, I would like to print the table in landscape.

   try {

    boolean complete = Table_Stud.print(JTable.PrintMode.FIT_WIDTH,header,footer);

    if (complete) {
       JOptionPane.showMessageDialog(null, "printing....");
    } else {
        JOptionPane.showMessageDialog(null, "Cancelled!");
} catch (PrinterException pe) {
    /* Printing failed, report to the user */

        JOptionPane.showMessageDialog(null, "Printing failed!");

Can anyone help?

have to add PrintRequestAttributeSet before printing to Printer

PrintRequestAttributeSet set = new HashPrintRequestAttributeSet();
Table_Stud.print(JTable.PrintMode.FIT_WIDTH, header, footer, false, set, false);

commented: highly appreciated.. +3