码迷,mamicode.com
首页 > 其他好文 > 详细

e686. 显示打印窗口

时间:2018-09-03 00:01:35      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:default   padding   int   set   amp   窗口   table   LTP   hang   

The print dialog allows the user to change the default printer settings such as the default printer, number of copies, range of pages, etc.

    PrinterJob pjob = PrinterJob.getPrinterJob();
    PageFormat pf = pjob.defaultPage();
    pjob.setPrintable(new PrintableClass(), pf);
    try {
        if (pjob.printDialog()) {
            pjob.print();
        }
    } catch (PrinterException e) {
    }

 

Related Examples

e686. 显示打印窗口

标签:default   padding   int   set   amp   窗口   table   LTP   hang   

原文地址:https://www.cnblogs.com/borter/p/9575614.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!