public PrintReport(JTable table, String title,String sumPrice,int cno) {
       
        this.table = (GeneralTableModel) table.getModel();
        this.title = title;
        this.sumPrice = sumPrice;
        this.cno = Integer.toString(cno);
        
        titleFont = new Font(title, Font.ROMAN_BASELINE, 20);              try {
        PrintService[] services = PrintServiceLookup.lookupPrintServices(
                DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);
        
        if (services.length > 0) {
            PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
            PrintService service = ServiceUI.printDialog(null, 200, 200,
                    services, services[0], null, attributes);
            if (service != null) {
                 DocPrintJob job = service.createPrintJob();
              
                    Doc doc = new SimpleDoc(this,DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);
                    job.print(doc, attributes);
              
            }
        }
        } catch (PrintException pe) {
            pe.printStackTrace();
        }
       
        Function.addNum();
    }
我想在上面的程序里,设置打印纸的大小为250mm*160mm,请高手帮帮忙!
谢谢!