• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S When it says to find a record using the record number...

 
Surya De
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...does that mean that I will have to return a new TableModel or can I do it differently in that the Table will scroll to the required record and highlight that particular row for example? So basically if we had a table of 100 rows and I searched the 71st record, then instead of creating an all new TableModel with just one row, could I just scroll it and indicate that is the particular record the user was searching for?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Surya,

Finding a record using the record number is something that is specific to the Data class. Displaying (and even just using) a TableModel is something that is specific to the View. How you interface these two separate areas of your application is up to you.

So you can choose to create new TableModels, or you can choose to modify the existing one in place. The second option would be my preferred option.

Regards, Andrew
 
Surya De
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers Andrew,

Thanks for the reply. I was going to go with the second option myself. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic