Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 10th, 2006, 06:06 PM
Authorized User
 
Join Date: Mar 2006
Location: , , United Kingdom.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing and printers

Hello

I've got a program here which among other things prints out the contents of a JPanel using a PrintJob object and the Printable interface.

My question is this: what's the link between the size of the JPanel as returned by getSize(), and the size of the printed output? Does it depend on the resolution of the printer? Mine is 1200dpi - should I expect that 600dpi printers will print twice the size?

Can I get at the printer's resolution somehow though the PrintJob object?

Thanks
Neil



Reply With Quote
  #2 (permalink)  
Old May 4th, 2006, 08:57 AM
Authorized User
 
Join Date: Apr 2006
Location: NaviMumbai, Maharashtra, India.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vakorde
Default

as PrintJob is a interface you will get 2 methods those will be useful in your case.
getPageDimension()
and
getPageResolution()

depend what implementation you are using, you will get the details.

---------------------------
Vikrant Korde
3i Infotech, Vashi,
Mumbai, Maharashtra, India.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List the Available printers ajit Java Basics 2 May 4th, 2007 07:54 AM
Command line printing to specific printers , trays sudarshan73 Reporting Services 0 January 23rd, 2007 03:51 PM
Add Printers ldoodle Classic ASP Basics 2 November 14th, 2006 09:20 AM
How to show all available printers name? vijaykumartaduri General .NET 1 October 13th, 2006 12:03 AM
printing without printDialog on mult. printers frankv25 VB.NET 7 January 10th, 2005 11:42 AM



All times are GMT -4. The time now is 05:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.