Posted Friday, February 17, 2006 @ 15:00:48
Be gentle... I'm a java n00b. :p
I'd like to have a blank column at the beginning of the table that I can populate based on a value in the data retrieved from the database, i.e. if column 3 contains "Boo", then column 0 gets a ghost gif.
{Edited to add}
Nevermind, I figured something out. See code below:
int cc = dBTable1.getColumnCount();
cc += 1;
Column c = new Column();
c.setHeaderValue("Indicator");
c.setLength(25);
c.setPreferredWidth(25);
dBTable1.addColumn(c);
// clear out the cells, just in case
for (int i=1; i<dBTable1.getRowCount()+1; i++)
{
dBTable1.setValueAt(" ", 1, cc-1);
}
//move new column to new location
dBTable1.moveColumn(cc-1,0);
[Edit by JustinSkalka on Friday, February 17, 2006 @ 16:08:32]