added ESC functionality to jframes