optimize Panel clickClose