Skip to content
Snippets Groups Projects
Commit 4c1edc29 authored by Le Van Truong's avatar Le Van Truong
Browse files

Update table model based on number of transactions

parent d6a8586c
No related branches found
No related tags found
1 merge request!319Update table model based on number of transactions
...@@ -8,6 +8,7 @@ public class TaskTransactionTableModel extends AbstractTableModel { ...@@ -8,6 +8,7 @@ public class TaskTransactionTableModel extends AbstractTableModel {
private JFrameInteractiveSimulation jfis; private JFrameInteractiveSimulation jfis;
private int nbOfRows; private int nbOfRows;
private SimulationTransaction data[]; private SimulationTransaction data[];
private int transSize = 0;
//private String [] names; //private String [] names;
...@@ -22,7 +23,7 @@ public class TaskTransactionTableModel extends AbstractTableModel { ...@@ -22,7 +23,7 @@ public class TaskTransactionTableModel extends AbstractTableModel {
if (data == null) { if (data == null) {
return 0; return 0;
} }
return data.length; return transSize;
} }
public int getColumnCount() { public int getColumnCount() {
...@@ -90,6 +91,7 @@ public class TaskTransactionTableModel extends AbstractTableModel { ...@@ -90,6 +91,7 @@ public class TaskTransactionTableModel extends AbstractTableModel {
} }
} }
transSize = t;
fireTableStructureChanged(); fireTableStructureChanged();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment