Solved

Printing to a Printer from a Java Program

Posted on 2004-09-04
4
155 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
GUI builder for Eclipse? 8 35
servlet doXXX methods 3 48
type mismatch (Object[] to double[] 4 23
JAVA API design with micro service cloud in mind 1 10
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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now