code: 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)
  	  		{}
    		}
    	}
docs: Highlights the specified element in the abc tune notation.
  @param elmnt The element to be highlighted in the abc tune notation.