Can you perhaps show the entire stack trace? There is something in the table model, but without that code or the stack trace it's impossible to know what.
But without the stack trace we still can't see what exactly is going wrong. There are quite a lot of method calls from the JTable constructors that it's hard to see what exactly goes wrong just by looking at this code.
G Kiran Kumar
Greenhorn
Joined: Apr 12, 2009
Posts: 14
posted
0
This is the complete code of the .java file. I have a table Triangle in Microsoft access DB. It has 14 columns
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
the culprit is likely to be in this bit
in particular these 2 lines
pos = colname.indexOf("_");
colname = colname.substring(0,pos) + " " + colname.substring(pos+1) ;
if there is not a '_' in colname, pos = -1, and you will get the exception you see.