private JTable tblResult;
private JTableHeader tblHeader;
private TableColumnModel tblColModel;
private TableColumn tblCol;
//function initialize()
// JTable
JTable tblResult = new JTable(new String[][] {{"1","","","","","","",""},{"2","","","","","","",""}}, new String[] {"Price","Duration","Account","Discounttype","Duration","Account","Discounttype","Passed/Failed"});
JTableHeader tblHeader = tblResult.getTableHeader();
TableColumnModel tblColModel = tblHeader.getColumnModel();
TableColumn tblCol = new TableColumn();
//Und jetzt soll das zeuch geändert werden und zwar sollen die Columns 1 und 4 (0,1,2,3,4) geändert werden nach strChangeState:
tblCol.setHeaderValue(strChangeState);
tblCol.setModelIndex(1);
tblColModel.addColumn(tblCol);
tblCol.setHeaderValue(strChangeState);
tblCol.setModelIndex(4);
tblColModel.addColumn(tblCol);
tblHeader.setColumnModel(tblColModel);