Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > positioning components on a printed page

Reply
Thread Tools

positioning components on a printed page

 
 
Richard Lewis
Guest
Posts: n/a
 
      08-27-2003
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;
}

}


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set value from web page to pre printed form =?Utf-8?B?R3VoYW5hdGg=?= ASP .Net 1 10-01-2005 01:21 PM
printing to pre-printed page. =?Utf-8?B?c2FtZWVy?= ASP .Net 1 06-08-2005 03:20 PM
printing to pre-printed page. =?Utf-8?B?c2FtZWVy?= ASP .Net 0 06-02-2005 10:25 PM
SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution Bluetears76 Java 1 07-01-2004 09:01 PM
Can Choice components respond to keyboard input like HTML Choice components? Mickey Segal Java 0 02-02-2004 10:59 PM



Advertisments