p; { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; // drawPage(g2); } public int print(Graphics g, PageFormat pf, int page)throws PrinterException { if (page >= 1) return Printable.NO_SUCH_PAGE; Graphics2D g2 = (Graphics2D)g; g2.setPaint(Color.black); g2.translate(pf.getImageableX(), pf.getImageableY()); g2.draw(new Rectangle2D.Double(0, 0, pf.getImageableWidth(), pf.getImageableHeight())); System.out.println("pf.getImageableWidth()" + pf.getImageableWidth()); System.out.println("pf.getImageableHeight()" + pf.getImageableHeight()); drawPage(g2); return Printable.PAGE_EXISTS; } public void drawP
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>