GUI to take URL as input
in
Programming Questions
•
7 months ago
Hey,
I am working on a Stemmer (implementation of Porter's Stemmer on Processing) that takes text files as input and takes the words and stems them down to their roots.
I have set it up so it has a GUI file chooser (JFileChooser) that helps the user pick a file from their computer and then the file is fed into FileInputStream (again with Java). Then the file is read character by character (or rather byte by byte) with the read() method and the words are then stemmed down to their roots. Here's the relevant code for the filechoose and the inputstream.
- final JFileChooser fc = new JFileChooser();
- int returnVal = fc.showDialog(this, "Open");
- file = fc.getSelectedFile();
- FileInputStream in = new FileInputStream(file);
This works perfectly and I have it set up the way I like. However, as the title suggests, what I am after is something like JFileChooser that I can use to enter URLs and then feed it to FileInputStream. I've been looking all over the place but haven't been able to find anything at all. I also realize I would need an HTML parser (maybe not?) but for that I have heard of something called TagSoup or something like that. Not sure that's the best way to go or not.
I'd really appreciate it if someone could help me out with these things.
1