como captura un dato en un JTable?
Yo llevo varios dias intentandolo y creo que es asÃ, prueba esto.
int numRows = table.getRowCount();
int numCols = table.getColumnCount();
javax.swing.table.TableModel model = table.getModel();
for (int i=0; i < numRows; i++) {
for (int j=0; j < numCols; j++) {
vFrecuencias[i]=Float.parseFloat(model.getValueAt(i, j).toString());
}
}
En mi caso recojo un Float, pero puedes recoger cualquier dato. Pruebalo!!
Y suerte!!
int numRows = table.getRowCount();
int numCols = table.getColumnCount();
javax.swing.table.TableModel model = table.getModel();
for (int i=0; i < numRows; i++) {
for (int j=0; j < numCols; j++) {
vFrecuencias[i]=Float.parseFloat(model.getValueAt(i, j).toString());
}
}
En mi caso recojo un Float, pero puedes recoger cualquier dato. Pruebalo!!
Y suerte!!