I'm having a problem deciding how to handle a situation. I'll briefly explain whats going on before I ask the question(s).
I have a viewObject (bean) and what it does is display information that is gathered. To keep it from getting too complicated I'll say I have 3 jLabels.
One jLabel (informationA) is gathered from a program that scans and saves to a file.csv.
jLabel two (informationB) and jLabel three (informationC) both are gathered from a database that is created by the user which is saved in file2.csv
To correctly have the information line up on this viewObject I am looking for a way to match them up.
I was suggested to use a hashTable. So I looked it up and it seems fairly self explanatory, but was looking to see if someone could explain how to use it more specifically for my situation, or perhaps explain if there is a better solution.
If what I am wanting to do is still unclear I'll explain using an analogy. Lets say the first jLabel (informationA) is on the first object, I then want a certain informationB and informationC to be displayed on the same viewObject bean.
For instance lets say I have these strings:
Now obviously I want these to match up correctly so that they make sense, such as:
Apple , Round , Green
and not like:
Apple , Square , Orange
I was considering appending file2.csv to file.csv by using contains(). But I'm not sure if that is the smartest route to take.
Help and suggestions are welcome and appreciated