Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
  2.  
  3. try {
  4.  
  5. URL url = new URL("http://dukegames.tk/archivos/changelog.txt");
  6. URLConnection uc = url.openConnection();
  7. uc.connect();
  8. //Creamos el objeto con el que vamos a leer
  9. BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
  10. String inputLine;
  11. String contenido = "";
  12. while ((inputLine = in.readLine()) != null) {
  13. contenido += inputLine + "n";
  14. }
  15. txt.setText(contenido);
  16. in.close();
  17. } catch (Exception e) {
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement