• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JTable List Field?

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the columns in my assignment(B&S) actually contain data that could be put into a list. This would be the "specialties" column in the database file. It's nothing but a comma separated list of string values, usually no more than 3 or 4 "specialties" per table row.

I present the data simply as is in my JTable. The table cell appears as: "value1, value2, value3", like so.

Do you think I will lose points for presenting this data this way? Should I use some other GUI component in the table cell to show this data, and if so what component? A combo box is used for selecting an item from a list. No selection is occurring here for these items. Is there some kind of list component (maybe a JTextArea?) I can use to show these values in list fashion? Or is this again beyond scope?

Any input is appreciated. Thanks.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey David,

I played with the idea of doing something with these values, too. After all, in the real world these values should be separated, so a search could be performed on a particular specialty. But it is beyond the scope of the assignment. Just leave these values in a single string.
 
David Sham
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured as much, but was not entirely sure. Thanks Jared.
 
My pie came with a little toothpic holding up this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic