• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AbstractTableModel, to wrap or not to wrap?

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can anyone tell me if they are wrapping the array of DataInfo objects passed back from the criteriaFind() method, before passing it onto the AbstractTableModel subclass. Or are you just dealing with the raw DataInfo objects and arrays directly?
What is the best approach? It seems when you try to use anything other than two dimensional arrays, it becomes a bit unpleasant.
Please advise.
Thanks,
Chiji
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I passed the DataInfo class to a method called setDataArray.
In this method I transform the DataInfo class into an Object[][]. It takes only three lines of code.
first create the Object[][] Loop through each record int DataInfo, and call getValues.
Mark
 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is getValues one of your own methods?
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have a getValues method in my TableModel class.
Oh I see, no that is a method provided to you in the DataInfo class.
Mark
[ July 02, 2002: Message edited by: Mark Spritzler ]
reply
    Bookmark Topic Watch Topic
  • New Topic