Guest User

Text file reading problem

a guest
Mar 28th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. public void read(){
  2.        try{
  3.            BufferedReader lasfil = new BufferedReader(new FileReader("npc.txt") );
  4.            ledig = lasfil.readLine();
  5.            while( visare < lines() ){
  6.                if(ledig.equals("909"/*Start*/) ){
  7.                    lasfil.readLine();
  8.                    do{
  9.                        namn = lasfil.readLine();
  10.                        full += "<b>" + rub[id] + "</b><br>" + namn + "<br>";
  11.                        id++;
  12.                        System.out.println(full);
  13.                    }while( !namn.equals("999"/*Stopp*/) );
  14.                    id = 0;
  15.                }
  16.                ledig = lasfil.readLine();
  17.                visare ++;
  18.            }
  19.            lasfil.close();
  20.        }        
  21.        catch(Exception e){}
  22.        full += "</html>";
  23.        lbl.setText(full);
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment