Hello. So i have a question regarding incrementing a value in a loop.
I have a data table in my swing program. the data table has 5 columns. In the last column is a integer. I want to be able to grab all the prices in a table of n size. as of right now i just grab the first column's price by doing the following..
how would i go about constructing a loop that adds up every price in that table and stores it in a variable so that i can use it for other things. Thanks any help would be great.
I have a data table in my swing program. the data table has 5 columns. In the last column is a integer. I want to be able to grab all the prices in a table of n size. as of right now i just grab the first column's price by doing the following..
Code:
Object colIndex = dataTable.getValueAt(0,4);
Comment