dialog.show();
dialog.setVisible(true);
                public void keyPressed( KeyEvent event ) {                    if ( KeyEvent.VK_ENTER == event.getKeyCode() ) {                        dialog.show();                    }                } 