Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private String linia;
- public ArrayList<Double> dane = new ArrayList<>();
- int a =10;
- JFileChooser jfc = new JFileChooser(".");
- if(jfc.showOpenDialog(this)==JFileChooser.APPROVE_OPTION){
- File f = jfc.getSelectedFile();
- try {
- FileReader fr = new FileReader(f);
- BufferedReader br = new BufferedReader(fr);
- int i = 0;
- while((linia = br.readLine())!=null){
- dane.add(Double.parseDouble(linia));
- System.err.println(dane.get(i));
- i++;
- jTextArea1.append(linia+"\n");
- String output = "";
- output+="blbabka";
- }
- } catch (FileNotFoundException ex) {
- Logger.getLogger(widok.class.getName()).log(Level.SEVERE, null, ex);
- } catch (IOException ex) {
- Logger.getLogger(widok.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement