• Post Reply Bookmark Topic Watch Topic
  • New Topic

Another JTable Printing Problem!

 
john von
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally was able to print my table on different pages without the awkward clipping. Now, new problem occurs:

1. The printed result(font size and row height) are different with maximize window and not. I think the result varies on how the application window was viewed. So how can i fix the size of print result with any window size?

2. How can i reduce the font size and row height of the table on print? The default size in the application display fits well, but when it was printed, the size is too big and looks un-professional.

Ive been working on this for a week now, any help will be appreciated greatly.
 
clio katz
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing that you are getting your printable gc from something like a screen-capture or a component-view-gc in order to print the JTable...?

If you are working with print code (i.e. Printable interface _print method), you could try scaling to fit the JTable gc into the PageFormat's imageable area.

Generally, you could try to scale the (minimized) JTable dimensions into the PageFormat imageable area with something like:


...you could also scale the clipping area or - if available - the image itself, using the same scaling factor... depending upon how your print code is structured

hth
[ July 06, 2004: Message edited by: clio katz ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!