I need to make a movie ticket program. I've written the majority of the class. The last thing to do is create a text file with PrintWriter
by sending the info to the text file.
I haven't gotten started on the second part yet. For now I'm just trying to get the first two lines of the seating chart to print. This doesn't require info from the class.
The problem is that nothing is being added to the text file at all. This is what I have so far:
public void createSeatingChart() throws FileNotFoundException
{
File seatingChart = new File("C:/Users/Chris/Documents/NetBeansProjects/Auditorium/seatingChart.txt");
PrintWriter pw = new PrintWriter(seatingChart);
pw.println("\t\tSeats");
pw.println("\t123456789012345678901234567890");
pw.close();
}
I'm pretty sure it's something small that I'm missing but I'm not sure what it is. Any ideas?