public void onLoad(JFileChooser fileChooser) {
        File file = fileChooser.getSelectedFile();
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new FileReader(file));
            String text = null;
            Integer line = 0;
            Integer pElement = 0;
            String[] dots;
            Point3D[] currentPointsArray = null;
            while ((text = reader.readLine()) != null) {
                text = text.replaceAll("\t", " ");
                line++;
                if (line == 1) {
                    dots = text.split("\\s+");
                    n=Double.parseDouble(dots[0]);
                    m=Double.parseDouble(dots[1]);
                    k=Double.parseDouble(dots[2]);
                    a=Double.parseDouble(dots[3]);
                    b=Double.parseDouble(dots[4]);
                    c=Double.parseDouble(dots[5]);
                    d=Double.parseDouble(dots[6]);
                    zn=Double.parseDouble(dots[7]);
                    zf=Double.parseDouble(dots[8]);
                    sw=Double.parseDouble(dots[9]);
                    sh=Double.parseDouble(dots[10]);
                }
                if(line == 2) {
                    figCount=Integer.parseInt(text);
                }
                if(line > 2) {
                    dots = text.split("\\s+");
                    if(dots.length == 1) {
                        currentPointsArray=new Point3D[Integer.parseInt(text)-1];
                        pElement=0;
                        points.add(currentPointsArray);
                    } else {
                        currentPointsArray[pElement] = new Point3D(Double.parseDouble(dots[0]),Double.parseDouble(dots[1]),0);
                    }
                }
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (reader != null) {
                    reader.close();
                }
            } catch (IOException e) {
            }
        }

    }