Update data of a column in JTable without affecting the other data

2

Good morning. maybe it's something very simple, is there any way to update the data of a column by means of a button? this without affecting the other data of other columns.

As you can see in the image, the purpose is to change all the data in the "TERMINATION" column to a different data:

In advance an apology if it's very simple, I'm somewhat inexperienced in java

    
asked by vicc skor 15.09.2017 в 18:18
source

1 answer

0

You have a for to traverse the rows of the jtable and the index of the column you put in hard bone as I see the image (the index would be 2, counting from zero).

for(int i = 0; completas....) {//para recorrer la filas de jtabla
    nombreJtable.setValueAt(Object aValue, int rowIndex, int columnIndex)
}

columnIndex = (depends on which column you want to change)

    
answered by 15.09.2017 в 19:49