dialog.setInitialHeight(500);
dialog.setInitialWidth(700);
dialog.showOkCancel(target, new DialogDelegate() {
@Override
protected Component getContents(String id) {
XStreamPersister xp = importer()
.createXStreamPersisterXML();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
try {
xp.save(model.getObject(), bout);
} catch (IOException e) {
bout = new ByteArrayOutputStream();
LOGGER.log(Level.FINER, e.getMessage(), e);
e.printStackTrace(new PrintWriter(bout));
}