Solved

Printing to a Printer from a Java Program

Posted on 2004-09-04
4
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 11986477
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

627 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