Garmaine Staff asked 2 years ago

I need some assistance to understand how to add my student object correctly to my list view. heres the snippet with the explanations of what im trying to do:

            //TODO: PART_4_3 
            // Open the file for reading and iterate through each
            // line of the file. Use the static method for parsing in the 
            // Student class to convert each line into a Student object.
            // Add each student to the roster_list.
            activeFile = openChooser.showOpenDialog(w);
            try {
                Scanner input = new Scanner(activeFile);
                while (input.hasNext()) {
                    Student st = Student.parse(input.nextLine(), "\\s");
                    activeOl.add(st);//not sure

                lstRoster.setItems(activeOl);//not sure
                input.close();//close file

            } catch (FileNotFoundException ex) {
//                txaDisplay.setText("File not found " + ex.getMessage());
//                lstRoster.

            //END PART_4_3

would love any suggestion