Hi
Java Ranchers,
I have run into a problem that has me stumped.... I am writing a simple menu planner with a database for the storage of meals and ingredients. I use a JTable to enter the Ingredients for each meal. The problem I am running into seems to be when I enter a value for the Ingredient (column #2 with 0 as the first column), that value is being repeated for all rows in the model. I have used my Netbeans debugger and I THINK I have narrowed things down to the setValueAt method of my table model. I say THINK because I just don't see how this problem is occuring...
The rowArray.set() call on line 10 seems to be the culprit, I.E The values in the model are null before that call is made and are null, and the values in the model after the call are the same as the value I entered for the Ingredient. I don't understand how the entire model in the rowData field is being updated with the repeated value? I also don't have a clue on where/how to about tracking down what is causing this problem...
Any ideas/suggestions are appreciated.
Wanted to add these as attachments but the .txt,.java,and .jav extensions are not allowed?
Thanks for the help!
PanelCode:
Model Code: