public static final String getSelectedText ( ListBox list ) { int index = list . getSelectedIndex ( ) ; return ( index >= 0 ) ? list . getItemText ( index ) : null ; }
Utility function to get the current text .