Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Added: Jun 20, 2021 5:48 PM
Views: 45
Tags: javafx
  1. public List<Point> getPoints(String file){
  2.         var points = new ArrayList<Point>();
  3.         try{
  4.             Path p = Paths.get("plot.csv");
  5.             var lines = Files.readAllLines(p);
  6.             for(var line : lines){
  7.                 points.add(new Point(line));
  8.             }
  9.         }catch(IOException e){
  10.             System.out.println("CSV nicht gefunden");
  11.             e.printStackTrace();
  12.         }
  13.         return points;
  14.     }