update frame and panel