Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Printing to a Printer from a Java Program

Posted on 2004-09-04
4
Medium Priority
?
161 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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…
Suggested Courses

722 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