Hi,
I have a JScrollPane with two coulmns. In the first column I have an image pane JTable, and in the second a list with names of sections. This second column I try to divide in two columns, one (the second column) to display the names of the sections (each row contains one name), and in the other column (the third) I want to show some values for every section in the row respectively. But, instead of displaying the desired values in the third column, I get the same names of the sections as in the second column. Here is a part of the code I have:
private Vector<Section> daten = new Vector<Section>(0); //These are the values for the first column in the Jscroll
private String[] header = {"Section","calcGYR"}; // These are the values for the second and third column (in this case the header for the both columns
public TrafficObserveModel(Vector<Section> daten) {
setData(daten);
}
public Object getValueAt(int row, int col) {
return ((Section)daten.elementAt(row));
}
public void setData(Vector<Section> daten){
this.daten = daten;
fireTableDataChanged();
}
public Vector<Section> getData() {
return daten;
}
But I don't know how to modify the methods in order to render the desired integer values in the third column. Can anybody help me please.
Thank you very much in advance.