Hey I've been trying to implement a programm which takes values from a GUI and gives them to another programm in a class written by me which should output a txt file. The GUI and the other class work fine but I cant seem to get the values from the GUI to the other class or the class member simply doesn't start. I have this so far:
import java.io.*;
//
//some code
//
public static void SaveTextToFile(String Name,String  Spec, String Text ){
    try{
        File file = new File("user.dir"+ File.separator + Name + File.separator + Spec + "Text.txt");
        file.getParentFile().mkdir();
        FileWriter writer = new FileWriter(file);
        writer.write(Text);
        writer.flush();
        writer.close();
    } catch
      (IOException e)  {}
    }
...
But somehow not even a file or a directory is created. Any ideas?
 
     
     
    