display the frame on the center
exit program when frame closed