This functionality replaces the deprecated listBox.addChangeListener(new ChangeListener(){//implementation} );
private ListBox populateLearningLanguage(){final ListBox listBox = new ListBox();addLanguages(listBox);listBox.setSelectedIndex(2);listBox.addChangeHandler(new ChangeHandler(){public void onChange(ChangeEvent event){int selectedIndex = listBox.getSelectedIndex();if (selectedIndex > 0)Window.alert("Something got selected " + listBox.getValue(selectedIndex));}});return listBox;}