This article has been dead for over three months
You
import javax.swing.*;
import java.io.*;
public class file
{
public static void main(String []args)throws IOException
{
FileWriter ryt=new FileWriter("c:\\alpe.txt");
BufferedWriter out=new BufferedWriter(ryt);
String name=JOptionPane.showInputDialog("Enter your name pls.");
out.write("Hello, "+name+"!");
out.write("\r\nThis the simple txt file that you created!");
out.close();
}
}