I have used a ResultSet that returns certain number of rows. My code is something like this:
ResultSet
ResultSet res = getData(); if(!res.next()) { Sy
You can use res.previous() as follows:
res.previous()
ResulerSet res = getDate(); if(!res.next()) { System.out.println("No Data Found."); } else { res.previous(); while(res.next()) { //code to display the data in the table. } }