I began playing around with the Java Printing API for my side project over the past couple days, and overall it's pretty straight-forward in terms of sending data to the printer. However, setting up how the page displays was a pain. In order to create documents to print from your Java program, the process is the same as painting on a JComponent. It still relies on rendering each element and specifying the pixel positions. My JComponents on my GUI wouldn't neatly fit on a page because of the scrollbar when I used their built-in print() methods, so I had to render the text in a table format manually disregarding the GUI layouts. After much playing around, I finally got the text spaced appropriately and not overlapping.
Also, per popular request, I have gotten my first Java Drag-and-Drop API tutorial up. Link: http://www.dreaminco...r-and-dragging/
Also, per popular request, I have gotten my first Java Drag-and-Drop API tutorial up. Link: http://www.dreaminco...r-and-dragging/
2 Comments On This Entry
Page 1 of 1

cfoley
14 January 2011 - 05:02 PM
I remember not liking Java printing very much! Not used it in years though.
Page 1 of 1
← March 2021 →
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
My Blog Links
Recent Entries
Recent Comments
Search My Blog
1 user(s) viewing
1 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)