M
Mark Sizzler
It all started with my search for a possibility to store data values in a JTable without displaying it.
I read somewhere in the Sun docs that columns without a header are not displayed.
Ok, I thought, according to a good coding style they are not displayed but they are stored.
But what a crap, the data is even worse deleted. See the simplified scenario below:
String rowData[][] = {
{ "firstrowfirstcol", "firstrowsecondcol" },
{ "secondrowfirstcol", "secondrowsecondcol" }
};
String columnNames[] = {
"col1head"
};
DefaultTabelModel mytm = new DefaultTableModel(rowData, columnNames);
After performing the last command not only mytm does not contain the values of the second column
but also the values of the second column are removed from the rowData!!!
What a poor system architecture. It costs me a half day to find it out because I could not believe it.
Do I really have to setup a storage outside of DefaultTableModel to be able to store
additional data ?
Mark
I read somewhere in the Sun docs that columns without a header are not displayed.
Ok, I thought, according to a good coding style they are not displayed but they are stored.
But what a crap, the data is even worse deleted. See the simplified scenario below:
String rowData[][] = {
{ "firstrowfirstcol", "firstrowsecondcol" },
{ "secondrowfirstcol", "secondrowsecondcol" }
};
String columnNames[] = {
"col1head"
};
DefaultTabelModel mytm = new DefaultTableModel(rowData, columnNames);
After performing the last command not only mytm does not contain the values of the second column
but also the values of the second column are removed from the rowData!!!
What a poor system architecture. It costs me a half day to find it out because I could not believe it.
Do I really have to setup a storage outside of DefaultTableModel to be able to store
additional data ?
Mark