get ID and display details in jlable
0 posts in topic
Thread View Thread View

get ID and display details in jlable...
Mon Dec 24, 2012 10:56 AM

i want to get ID number and display details.

when i use scanner class for get id number,and consol window for display detalis, all things is good and perfect. but when i use a jtextfield for get id and a jlable for display detail information, program find just last record in file and not find other records.
  my code is here
int idS=Integer.parsInt(JTextfield1.getText()); 
    File f=new File("C:\\SearchFile.txt");  
   FileReader fr=new FileReader(f);  
   BufferedReader br=new BufferedReader(fr);
     String s; 
       String[] st=s.split(" ");   
      String id=st[0];     
    String name=st[1];  
       String mark=st[2];  
           JLable1.setText(id+" "+name+ " "+mark);   
      }     }

please help!

About | Sitemap | Contact