GraphicsDevice device = environment.getDefaultScreenDevice();
DisplayMode display = device.getDisplayMode();
int x = display.getWidth();
int y = display.getHeight();
if(x < minXResolution || y < minYResolution) {
QuestionDialog resolutionWarning = new QuestionDialog(gui, Dictionary.RelosutionDialogWarning) {
private static final long serialVersionUID = -2534780214591239505L;
@Override
public void cancelButtonClicked() {
System.exit(0);
}
@Override
public void noButtonClicked() {
System.exit(0);
}
@Override
public void yesButtonClicked() {
setVisible(false);
}
};
resolutionWarning.setVisible(true);
}
}