when control gose to this method Application Freezes i want to show the results on the JTextField but as long as the program is downloading pages from links it remain still no output result shows in the text field
here is the method code// here i call this method downloadpage for (Element link : links) { print(" * a: <%s> (%s)", link.attr("abs:href"), trim(link.text(), 35)); myField.setText(i+"%"); downloadpage(link.attr("abs:href"),link.text()); }
I'm a beginner Please Help Meurl = new URL(Link); String name; name = "D:\\net\\"+Name+".html"; reader = new BufferedReader(new InputStreamReader(url.openStream())); writer = new BufferedWriter(new FileWriter(name)); String line; while ((line = reader.readLine()) != null) { writer.write(line); writer.newLine(); } reader.close(); writer.close();