positioning components on a printed page

Discussion in 'Java' started by Richard Lewis, Aug 27, 2003.

  1. 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;
    }

    }
    Richard Lewis, Aug 27, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2FtZWVy?=

    printing to pre-printed page.

    =?Utf-8?B?c2FtZWVy?=, Jun 2, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    409
    =?Utf-8?B?c2FtZWVy?=
    Jun 2, 2005
  2. =?Utf-8?B?c2FtZWVy?=

    printing to pre-printed page.

    =?Utf-8?B?c2FtZWVy?=, Jun 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    396
    Oenone
    Jun 8, 2005
  3. =?Utf-8?B?R3VoYW5hdGg=?=

    Set value from web page to pre printed form

    =?Utf-8?B?R3VoYW5hdGg=?=, Oct 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    375
    S. Justin Gengo
    Oct 1, 2005
  4. Mickey Segal
    Replies:
    0
    Views:
    855
    Mickey Segal
    Feb 2, 2004
  5. Abby Lee
    Replies:
    2
    Views:
    330
    brucie
    Oct 14, 2004
Loading...

Share This Page