Add Printing Settings in Java Code

Sarki Amada
Sarki Amada used Ask the Experts™

I'm new to java, I have a jTextArea that I want to send it's content to print.
I was able to achieve that using
Boolean complete=jValueText.print();
            if (complete){
                JOptionPane.showMessageDialog(null, "Done Printing...");
                JOptionPane.showMessageDialog(null, "Printing...");

Open in new window

This approach will show a printer dialog and the user can set the settings, like paper orientation etc. But I'll like to just set the settings in the java code, so when the user clicks the print button, it will just print the text using the settings I configured in the java code.
The settings I want to configure are;
Page size
Printer to use
Scale size of the page
I'm using Netbeans 8.2, MacBook Pro Sierra
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: CEHJ (https:#a42348335)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial