So I was making a program called "TextCreator", and I ran into a problem, and it was that my program was not creating files. I wanted to make a file called "file.txt", and here's my code:
String fileName = TxtName.getText();
File file = new File("file.txt");
Because this was not working, I tried creating a file on my pc called "file.txt", and that did not work either. I am using java.io.file.