FontRenderContext frc = new FontRenderContext(null, true, true);
Formatter fmt = new Formatter(report, context, frc, pageStore);
long tm = System.currentTimeMillis();
tm = System.currentTimeMillis()-tm;
System.out.println("Time for formatting: " + tm + "ms");
PreviewDialog frame = new PreviewDialog(null, fmt, pageStore);
frame.setTitle("Print preview");
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});