Add ESC and ENTER functionality to custom jdialog