public void updateWindow() {
        if(change){
            if(mode==0) {
                if(moveStep>0) {
                    upgradeFrame.setLocation(upgradeFrame.getX(), upgradeFrame.getY()+5);
                    upgradeFrame.setSize(upgradeFrame.getWidth()-7, upgradeFrame.getHeight()-10);
                    moveStep--;
                    requestFocus();
                } else {
                    moveStep=0;
                    change=false;
                }
            } else if(mode==1) {
                if(moveStep<30) {
                    upgradeFrame.setLocation(upgradeFrame.getX(), upgradeFrame.getY()-5);
                    upgradeFrame.setSize(upgradeFrame.getWidth()+7, upgradeFrame.getHeight()+10);
                    moveStep++;
                    requestFocus();
                } else {
                    moveStep=30;
                    change=false;
                }
            }
        }
    	}