final String title = getDisplayName();
// look where we have been added ...
final Window w = SwingUtil.getWindowAncestor(reportPane);
if (w instanceof Frame)
{
aboutFrame = new AboutDialog
((Frame) w, title, JFreeReportInfo.getInstance());
}
else if (w instanceof Dialog)
{
aboutFrame = new AboutDialog
((Dialog) w, title, JFreeReportInfo.getInstance());
}
else
{
aboutFrame = new AboutDialog
(title, JFreeReportInfo.getInstance());
}
aboutFrame.pack();
RefineryUtilities.centerFrameOnScreen(aboutFrame);
}