BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JdbTable problems after JBuilder X upgrade

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder DB Swing
View previous topic :: View next topic  
Author Message
donalmurtagh@yahoo.co.uk
Guest





PostPosted: Thu Jan 20, 2005 6:21 pm    Post subject: JdbTable problems after JBuilder X upgrade Reply with quote



Hi,

I recently upgraded to the version of dbSwing.jar bundled with JBuilder
X and JDK 1.4. I'd previously been using dbSwing3.0.jar with JDK 1.3.

The code compiles fine with this new version of the library, but I get
lots of exceptions when running. The first problem I had was with:

jdbTable1.getColumnModel().getColumn(2);


This caused the following exception:

java.lang.ArrayIndexOutOfBoundsException: 2 >= 1

at java.util.Vector.elementAt(Vector.java:431)

at
javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:277)

at
lu.scoteqint.seiBrowser.JListView.dataSet_opened(JListView.java:381)

at
lu.scoteqint.seiBrowser.PnlBrowser_dataSet_openAdapter.opened(PnlBrowser.java:1147)

at com.borland.dx.dataset.DataSet.a(Unknown Source)

at com.borland.dx.dataset.DataSet.open(Unknown Source)

at com.borland.dbswing.JdbTable.bindDataSet(JdbTable.java:2749)

It looks like this is an attempt to access a column which doesn't exist
(but if so, why didn't dbSwing3.0.jar throw an exception?). Anyway, I
commented this code out, but then the following call:

jdbTable1.setHiddenColumns(new int[]{0,1});


Generates this exception:

java.lang.NullPointerException

at com.borland.dbswing.JdbTable.bindDataSet(JdbTable.java:2758)

at com.borland.dbswing.JdbTable.addNotify(JdbTable.java:2733)

at java.awt.Container.addNotify(Container.java:2049)

at javax.swing.JComponent.addNotify(JComponent.java:4291)


In both cases, the following line features in the stack trace in both
cases:

newFrame.setVisible(true); //newFrame contains JdbTable1

so my best guess is that it's something to do with the order in which
the columns are constructed, and when they may be shown/hidden, but I'm
really not too sure what's going on. Has anyone else had similar
problems when moving from dbSwing3.0 or JDK 1.3?
Many thanks in advance!
Don

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder DB Swing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.