private void readFromFile(File file){

//        fieldNameFile.setText(file.getName().split(".java")[0]);
        fieldNameFile.setText(file.getName());

        ArrayList<String> buffer =(ArrayList<String>)PreparingNewAlgos.readSourceFromFile(file);

        for(int i = buffer.size()-1; i>=0; i--)
            textArea.insert(buffer.get(i)+"\n",textArea.getRows());

    }