Solved

Printing to a Printer from a Java Program

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bunnyEars2 challenge 6 66
array11 challenge 16 51
countPairs challenge 7 57
JList custom Cell Renderer refresh 15 39
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

708 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

13 Experts available now in Live!

Get 1:1 Help Now