private Textbox testTextB; testTextB.addEventListener(Events.ON_OK, new EventListener<Event>() { @Override public void onEvent(Event event) throws Exception { // TODO Auto-generated method stub System.out.println("enter is press"); } });