void () { if (!myFrame.isDisplayable() || !myFrame.isShowing()) { return; } Point locationOnScreen = myFrame.getLocationOnScreen(); if (myFrame.getWidth() == 0 || myFrame.getHeight() == 0 || locationOnScreen.x > 0 || locationOnScreen.y > 0) { handleFullScreenResize(myFrame); } }