bsp; exception) { JOptionPane.showMessageDialog(this, exception); } } } else if (source == pageSetupButton) { PrinterJob printJob = PrinterJob.getPrinterJob(); if (pageFormat == null) pageFormat = printJob.defaultPage(); pageFormat = printJob.pageDialog(pageFormat); } } private JButton printButton; private JButton pageSetupButton; private PrintPanel canvas; private PageFormat pageFormat; } class PrintPanel extends JPanel implements Printable { @Override public void paintComponent(Graphics g) &nbs
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>