According to the row count records r splitted to 10 per page. That is if i give 12 records in rowcount.It'll show 10 records in one page and 2 records in second page. Records in jtable r saved in arraylist and using tokenizer we r retrieving the records. And i've used the below code to split the records as 10 per page.
This is called in the Next button click event
-
private void Assign_Page2(int RowCount) {
-
System.out.println("4");
-
if (Page == 1) {
-
System.out.println("5");
-
Page = (RowCount / Count) + 1;
-
} else {
-
System.out.println("6");
-
Page --;
-
}
-
if (Page * Count <= RowCount) {
-
System.out.println("7");
-
int start = ((Page - 1) * Count) + 1;
-
int end = Page * Count;
-
Tableshow(start, end);
-
} else {
-
System.out.println("8");
-
int start = ((Page - 1) * Count) + 1;
-
int end = RowCount;
-
Tableshow(start, end);
-
}
-
}
-
Now i want to store and retrieve the values i give in each page using arraylist tokenizer. If i give back button the values which i gave in page 1 or page 2 should display. So kindly help