Skip to Content
0
Former Member
Apr 07, 2004 at 02:49 PM

Retrieving data from TableView in the processAfterInput Method

35 Views Last edit Oct 08, 2020 at 01:43 PM 2 rev

I am trying to retrieve the content of the cells in my TableView in the processAfterInput Method.

I do get the TableView with the following code:

TableView table=((TableView)this.getComponentByName("table"));

Afterwards I try accessing the cells with the following code:

for(int row=1;row<table.getRowCount();row++){

for(int col=1;col<table.getColumnCount();col++){

log(table.getValueAt(row,col));

}

}

But when I call table.getValueAt(row,col) the Method get ValueAt in the DefaultTableModel class throws a NullPointerException. Now I don't know, how to go on.

Thanx for your help.