if (getSelectedText() == null || (textComp.getText().equals("")))
if (getSelectedText() == null || (JTextComponent.this.getText().equals("")))
    public int getSelectionStart()    {      if (getSelectedText() == null || (textComp.getText().equals("")))        return 0;      return textComp.getSelectionStart();    }