I created two classes,”HtmlParser” for parsing html tags and “ConvertToText” class to accept the source html file name.HtmlParser class has a method called htmlTextParser(Filename).I wrote
HtmlParser.htmlTextParser(textfieldname.getText());
statement to call HtmlParser class from ConvertToText class, so that when I enter a html file name in textfield, it needs to be passed to htmlTextParser() method. The problem here is, the text must be accepted as filename.
The error I got was htmlTextParser(String) is undefined for the class HtmlParser.Please help
Yes,
new File(name).isFile()will return true ifnameexists and is a file(eg. not a directory)