U can put 'ESC' on button in 2 waysJButton jb=new JButton("ESC");orJButton jb=new JButton();jb.setText("ESC");