private String getSelectedText(){
        String text = "";
        if(activField.equals("textArea"))
            text = textArea.getSelectedText();
        if(activField.equals("fieldNameFile"))
            text = fieldNameFile.getSelectedText();
        if(activField.equals("fieldCommandLine"))
            text = fieldCommandLine.getSelectedText();
        return text;
    }