Posted Wednesday, October 13, 2004 @ 22:37:19
QuickTable prints the tables with the original font of the table. So during priniting you can apply a skin and change the look of the table such that the font size & row height is reduced , so that we can fit more rows/columns in one page
You can create the following skin
class PrintSkin extends Skin
{
public PrintSkin()
{
put(Skin.TABLE_FONT,new Font("Arial",Font.PLAIN,10));
put(Skin.ROW_HEIGTH, new Integer(12));
}
}
//during print/printpreview
dBTable1.setSkin(new PrintSkin());
dBTable1.printPreview();
//after the print/printpreview is complete, you can switch back to original size
dBTable1.setSkin(null);
//Important, you cannot reset the skin until print/printpreview is complete