Hi!
I have tried to overwrite the DefaultTableModel (making my own model extending the default one) but without success. At first I ave used the default table model directly but now I have to use my own model.
I used to call the DefaultTableModel like this:
Where vecCorrections was an empty vector(!). I wanted only to have the headers and add data later ... this worked fine. But now, after having overwritten the DefaultTableModel in my own model-class the table won't get build. I think I don't call the contructor in a right way or made a mistake in overwriting it:
What would be the correct way to overwrite the constructor...?
Cheers
frag
patrick.metz@epost.de
I have tried to overwrite the DefaultTableModel (making my own model extending the default one) but without success. At first I ave used the default table model directly but now I have to use my own model.
I used to call the DefaultTableModel like this:
Code:
ttmCorrections = new DefaultTableModel(vecCorrections, vecCorr_Headers);
Where vecCorrections was an empty vector(!). I wanted only to have the headers and add data later ... this worked fine. But now, after having overwritten the DefaultTableModel in my own model-class the table won't get build. I think I don't call the contructor in a right way or made a mistake in overwriting it:
Code:
import javax.swing.table.DefaultTableModel;
import java.util.*;
/**
*
*
*/
class CorrectionTableModel extends DefaultTableModel {
private Vector headerVec;
private Vector rowVec;
private Vector colVec = new Vector();
public CorrectionTableModel(Vector rVec, Vector hVec) {
super(rVec, hVec);
this.rowVec = rVec;
this.headerVec = hVec;
}
What would be the correct way to overwrite the constructor...?
Cheers
frag
patrick.metz@epost.de