set action on close with jframe