开发者

Printing JTables from Java

开发者 https://www.devze.com 2023-03-30 14:58 出处:网络
I have four JTables which for the user looks like one table. (Why four instead of one? It\'s a long story but we want to keep it that way) What is the best way to print these four tables, so they stil

I have four JTables which for the user looks like one table. (Why four instead of one? It's a long story but we want to keep it that way) What is the best way to print these four tables, so they still look like one table?

The print() m开发者_StackOverflowethod doest not really allow us to print four tables together?

We also want to add a legend at the top with some descriptive info about the table.


Thanks for your answers!

We found an excellent solution! Used The Flying Saucer XHTMLrenderer for generating a html/css page. The page could then be viewed with the XHTMLPanel from the same framework and sent to Java's regular PrinterJob.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号