positioning components on a printed page

R

Richard Lewis

I have 2 Canvas objects that I want to print next to each other on a page.
How can I adjust where they appear so one does not print over the other?

class PaintContent implements Printable {
private CustomCanvas c;
private ZoomCanvas z;
public PaintContent(int x, int y, int zoom)
{
c = new CustomCanvas();
z = new ZoomCanvas(x,y,zoom);
}
public int print(Graphics g, PageFormat pf, int pageIndex)
throws PrinterException {
c.paint((Graphics2D) g);
z.paint((Graphics2D) g);
return Printable.PAGE_EXISTS;
}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top