Window owner = findDialog.getOwner();
findDialog.pack();
if (location == null) {
// the first time creation in this app's life-cycle
findDialog.setLocationRelativeTo(owner);
Application application = Application.getInstance(Application.class);
ApplicationContext appContext = application.getContext();
try {
if (application instanceof SingleXFrameApplication) {
((SingleXFrameApplication) application).prepareDialog(findDialog, false);
} else {
appContext.getSessionStorage().restore(findDialog, "findDialog.session.xml");