@Override public void setBounds(Rectangle r) { ScreenUtil.fitToScreen(r); super.setBounds(r); }
@Override public void setBounds(int x, int y, int width, int height) { Rectangle rect = new Rectangle(x, y, width, height); ScreenUtil.fitToScreen(rect); super.setBounds(rect.x, rect.y, rect.width, rect.height); }