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
Joined: Apr 12, 2009
This is the complete code of the .java file. I have a table Triangle in Microsoft access DB. It has 14 columns
Joined: Jun 09, 2003
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.