Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

record number is not returned by getValues method

 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am thinking that record number will be required to be retrieved but I don't see any method that returns record number. getValues in DataInfo does not include record number in the string array that it returns. Also I think TableModel must know datatypes of each column to be able to properly format the values on the screen. Any thoughts ??
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you get DataInfo object there is method called getRecordNumber
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Formatting based on datatypes is not a requirement. Just display it as it is.
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Yes, I noticed a method getRecordNumber, just after I posted my original message. Regarding the formatting, I was thinking to format the data on the screen e.g. showing dollar sign for amount, showing numbers right justified etc.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!