Is there is abetter performance to read from file than my code for longfile
Hi
This is my code to read from file and show it in a text area ,but for long file it wait for along time to show the file ,Is there is better performance code?
chooser=new JFileChooser();
chooser.showOpenDialog(sav);
File fe=new File(chooser.getSelectedFile().getAbsolutePath());
//out = new PrintWriter(new FileOutputStream(f));
in2 =new BufferedReader(new FileReader(fe));
str=in2.readLine();
if(str!=null)
nn2=str;
str=in2.readLine();
try{
while((str)!=null)
{ nn2=nn2+"\n"+str;
str=in2.readLine();
}}catch(NullPointerException e){}
jta2.setText(nn2);
in2.close();
// in2 = new BufferedReader(new FileReader(fe));
}catch (IOException ex){
}catch(NullPointerException e){}
nn1=str;

