public WindowConfigurationStorage decorateDialog(JDialog dialog, String propertyName) { String unmarshalled = getProperty(propertyName); if (unmarshalled != null) { WindowConfigurationStorage storage = (WindowConfigurationStorage) unMarshall(unmarshalled); if (storage != null) { dialog.setLocation(storage.getX(), storage.getY()); dialog .getRootPane() .setPreferredSize(new Dimension(storage.getWidth(), storage.getHeight())); } return storage; } return null; }