Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JTable Paging

Status
Not open for further replies.

kohinoor2007

Programmer
Mar 21, 2007
69
DE
Hi Guys,

I intend to use the following paging model implemented with the table when handling large amounts of data.


The table shows only 100 entries at a time in the table.The next or previous 100 entries are got by clicking the corner buttons("Down" or "Up" buttons) in the scroll pane.

I want the table to behave in a different way ,without this corner buttons.

[1]The scrollbars should look in a way that the Table is filled with all the data's.Can we mimic the Tablemodel to do something like this?

[2]The table should be filled with the next 100 or previous 100 entries while scrolling up & down the table, either using the scroll bar,the arrow buttons in the scroll bar or when he selects a row in the table and uses the up,down arrow keys of the keyboard.

For the end user, the behaviour of the Table is as if the whole list of data is loaded into the Table.

Is this possible or what could be done to achieve something close to this...What shoule be changed in the PagingModel.Java file

Thanks
P
 
For question[2], do you mean that next 100 or previous 100 entries will be shown when user use arrow key up on top record in the page or down arrow key on the bottom record on the page?
 
// jsp.setCorner(ScrollPaneConstants.UPPER_RIGHT_CORNER, upButton);
// jsp.setCorner(ScrollPaneConstants.LOWER_RIGHT_CORNER, downButton);
// comment these 2 lines for the buttons
// I will try some coding when I am at home.
 
Thanks prosper for the effort...

>>For question[2], do you mean that next 100 or previous >>100 entries will be shown when user use arrow key up on >>top record in the page or down arrow key on the bottom >>record on the page?

It can be the next or previous 100 entries depending on wheather the scroll bar is moved down or up...
 
And yet, regrettably, the whole construct fails for a record set that is not divisible by the page size.

Has anyone found a solution such as this with an uneven record set?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top