Hello, I am trying to create an inventory type program in which I have a JTable that lists all of the stock. The last column in the table will have 2 buttons and a textfield that will be used to either add or take stock away from the list. All of the data is being filled via a database.
2014-07-22_0736.jpg
The problem that I am having is that when I add or subtract using the buttons, the correct numbers show up in the textfield but when I go to the next row or another row, the previous textfield reverts back to 0(default) and the count that I had in the first textfield is carried over to the next row etc. I need to be able to add values to each row, and have the table remember those particular numbers.
I have spent 2 days on this and still cannot figure it out, so I am just wondering if anybody has any ideas or can help me solve this issue. Basically the way I have my code setup is I have a custom component class which creates the 2 buttons and text field and adds them to a panel.
I then have a custom cell editor and renderer...unfortunately I cannot post my code it says its denied and won't let me post it.
Any help or advice would be greatly appreciated.