public void setSelectedItem ( PositionableInCharStream elmnt ) { CharStreamPosition pos = null ; if ( elmnt != null ) pos = elmnt . getCharStreamPosition ( ) ; if ( pos != null ) { int begin = pos . getStartIndex ( ) ; int end = pos . getEndIndex ( ) ; try { setCaretPosition ( end ) ; moveCaretPosition ( begin ) ; getCaret ( ) . setSelectionVisible ( true ) ; repaint ( ) ; } catch ( IllegalArgumentException ignored ) { } } }
Highlights the specified element in the abc tune notation .