added WindowListener in Program, added exittask