}
final JDialog dialog = optionPane.createDialog(parentComponent, controller.getDialogTitle());
dialog.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
dialog.setResizable(true);
// Pack again because resize decorations may have changed dialog preferred size
dialog.pack();
dialog.setMinimumSize(getPreferredSize());
// Add a listener that transfer focus to focusable field of texture panel when dialog is shown
dialog.addComponentListener(new ComponentAdapter() {
@Override
public void componentShown(ComponentEvent ev) {