Gents as you can see I have done great progress in getting the last line and the line beforelast working and spliting but I am stuck now as I need to the beforethat (3rd) line from last also included and I can't figure it out, everything i do fails to compile or fails to run.

Any suggestions?

Scanner scanner = new Scanner(new File(resultfile));
                                String last = null;
                                String beforelast = null;
                                String beforethat = null;
                                while (scanner.hasNextLine()) {
                                        beforelast = last;
                                        last = scanner.nextLine();
                                }

                                String arr[] = last.split(",");
                                RecordID1.setText(arr[0]);
                                RecordID2.setText(arr[1]);
                                RecordID3.setText(arr[2]);
                                RecordID4.setText(arr[3]);
                                RecordID5.setText(arr[4]);

                                String arg[] = beforelast.split(",");
                                RecordID6.setText(arg[0]);
                                RecordID7.setText(arg[1]);
                                RecordID8.setText(arg[2]);
                                RecordID9.setText(arg[3]);
                                RecordID10.setText(arg[4]);

                                String agg[] = beforethat.split(",");
                                RecordID11.setText(agg[0]);
                                RecordID12.setText(agg[1]);
                                RecordID13.setText(agg[2]);
                                RecordID14.setText(agg[3]);
                                RecordID15.setText(agg[4]);

                                scanner.close();

How about adding beforeThat = beforeLast; between line 5 & 6?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.