import java.io.*;
import java.awt.*;

public class WordCounter extends Frame
{
	public static void main(String[] args) throws IOException
	{
		WordCounter wc = new WordCounter();

		// Open a dialog box
		FileDialog fd = new FileDialog(wc, "Open a text file");
		fd.setVisible(true);
		
		// Get the name of the selected file and open it.
		String dirName = fd.getDirectory();
		String fileName = fd.getFile();
		File textFile = new File(dirName, fileName);

		// Your code should be here.
	}
}
