}
@Override
public void setVisible(boolean visible) {
if (visible) {
new WindowGeometry(
getClass().getName() + ".geometry",
WindowGeometry.centerInWindow(
getParent(),
new Dimension(400,400)
)
).applySafe(this);
setCanceled(false);
startUserInput();
} else if (isShowing()) { // Avoid IllegalComponentStateException like in #8775
new WindowGeometry(this).remember(getClass().getName() + ".geometry");
pnlAdvancedQueries.rememberSettings();
}
super.setVisible(visible);
}