如何打印出一个JTable中的特定行/列?

问题描述:

我能够打印完整的JTable,但实际上我想更多的从第10行打印一个JTable的只是一个特定部分,例如行50列和70列150。
怎么办呢?

I am able to print a full JTable, but actually I would like more to print just a specific part of a JTable, for example from Row 10 to Row 50 and Column 70 to Column 150. How to do it ?

获取所选择的片段小区边界和计算所需的区域(长方形),定义剪辑区域画唯一需要的区域,可打印使用图形的 translate()方法来渲染转变。

Get cell bounds for the selected fragment and calculate desired region (Rectangle), define clip region to paint only desired region, in the printable use Graphics's translate() method to shift the rendering.