Possible Duplicate:
How to display first row until last row to JR report using Java?
i want to call the record in table from first row until last row and display it ..
i used this syntax :
TableModelEvent tab = new TableModelEvent(view.getTable().getModel());
int first = tab.getFirstRow();
int last = tab.getLastRow();
for(int a = first;a<last;a++){
JTable tables = new JTable(view.getTable().getModel());
if(tables.getColumnName(3).equals("Price")){
BigDecimal price = (((BigDecimal)view.getTable().getModel().getValueAt(a,3)));
but it just display the data from last row, so what to do to display data from first row until lastrow ?