Solved

Printing to a Printer from a Java Program

Posted on 2004-09-04
4
156 Views
Last Modified: 2010-03-31
Hey Experts!

First of all, I know this question needs more search than I have already done, but I am ready to do more if I am provided with sufficient guidelines to my question. I need to print to a printer the contents of a panel (specifically a JSplitPane) inside an applet (when the user clicks a print button), so it would appear as a report on a page (and it would be really beneficial if the user gets to chose between the available printers).

I did some search, and noticed the following (without knowing how to benefit from them - but they may help you):
1- System.out is the standard output, it is by default the screen, but can be changed to be a printer or anything that can act as an output device.

2- There is a java.io.PrintWriter which prints formatted output (as lines), and it implements all the methods of PrintStream.

P.S.: The solution should be compatible to only java 1.3.* (and not above) :( (but if you have a solution compatible to only 1.4.* please do post it, it would be really beneficial, and you will surely be credited)
0
Comment
Question by:mte01
  • 3
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 11986477
0
 
LVL 92

Expert Comment

by:objects
ID: 11986478
0
 
LVL 3

Author Comment

by:mte01
ID: 11987348
Thanks for your support!! It's amazing how much information you can find when you search the internet
0
 
LVL 92

Expert Comment

by:objects
ID: 11987355
Yes, what did we do before it's existance :)
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question