my application has a JDialog, with a component (between others)a added inside that is subsubsubsubclass of JPanel (furtheron jpanel). After separating that jpanel from JDialog, I have problems:
to visualize (show(),update(), setVisible(true)), etc.
But what is more intriguing, during debugging, application is just stopping inside catch of SQLException, instead of advancing further like it was before I separated this instance of jpanel from jdialog. Debugging revelas that the application stucks inside empty catch block! and after some recoding around , still inside catch of SQLException block...
I also do not instantiate JDialog directly but through a chain of instantiations... Any comments?
[This message has been edited by G Vanin (edited October 30, 2001).]
hi, whats this SQLException? what says the StackTrace? post the relevant code. chantal
posted 17 years ago
Hi, Chantal, java.sql.SQLException, you may consult http://dpinid03.iapmei.pt/p3/manuais/docs/api/index.html There is no printStackTrace() in catch() but if to insert it then it gives exactly the same in working and dying variants. Try-catch is just obligatory because ResultSet executeQuery() throws SQLException; throws it. Then someone has used SQLException just to determine the absence of needed value in the table and put in corresponding GUI TextField "N�o atribuido" The problem that no changes was done inside the instanceOfJPanel class (it has also treatment of JDBC access). I regret that I mentioned SQLException at all. The question was about Swing components tricks and it is abt this this thread is, isn't it? I doubt that it will be helpful to post here a few MB of code
[This message has been edited by G Vanin (edited October 31, 2001).]
So you have a sub-class of JPanel in a JDialog... which is having trouble displaying... and a SQLException is being thrown. Is the SQLException being thrown repeatedly in the constructor of the JPanel? This would explain why it doesn't display correctly... As far as an exception getting "locked up" in an empty catch statement... that simply does not happen... it either propagates to a higher try/catch block, and if not caught, then exits the program. Is the try/catch in a loop, or does the catch try to execute the process over? That is the only way you are going to get the behavior you describe...
Besides... it would really help if you posted some code... mostly just code where you are adding the JPanel to the JDialog, launching the JDialog, and the code in the area that gets the SQLException, and any relevant code that calls that area...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
posted 17 years ago
Hi, Nathan, I just wanted to eMail you some code files, but I cannot get neither your Email nor profile. I shall go now to JavaRanch to post there the technical questions about functioning of this site.
Yes, but the buttons do not function. Then it is not the problem of the site. I currently started to have multiple problems with my Windows2000 Adv. Server. The previous owner installed it, and nobody has its installation CD. The problem is that, in order to minimize memory use, I disabled too many sevices in Administration Tools - Services and I can't enable them back, the fram of "Properties" of a service just does not appear! The problem is that I did not notice any problems since I was not shutting down for weeks and now it appears all of a sudden... I also cannot make: the copy-paste (in MS applications), copying files, Drag&Drop,print files, etc.