Re: [mdr-users] MDR and Swing
Dimitrios Kolovos <[email protected]> Tue, 20 Sep 2005 11:06:17 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Martin, Thanks for your reply. Yes, the application freezes forever. I have looked into it and managed to get somehow deeper into the problem. I believe it has to do with threads and it is not limited to Swing only. For example when I populate a RefPackage (e.g. refPackage) in the main method of my (Swing) program and try to access it on a button click event - AbstractAction.perform() -, since the perform() function is run by the dispatcher in a different thread, I get no response (the code freezes at the statement I try to access e.g. refPackage.refAllClasses() and the statement does not return!). However, if I populate refPackage inside the perform() method (so that it is in the same thread with the accessing code), everything works fine. Any ideas? Cheers, Dimitrios Martin Matula wrote: > Hi Dimitrios, > what kind of freezing do you mean? Does your application freeze forever? > Martin > > Dimitrios Kolovos wrote: > >> I am working on a small utility that displays and MDR model in a >> JTree. In generally I face a lot of execution "freezing" issues and I >> often have to call SwingUtilities.invokeLater() to prevent execution >> from freezing where MDR is involved. Does anyone else have similar >> (bad) experience (and hopefully come up with a solution) with MDR and >> JTree (or Swing in general)? >> >> Cheers, >> Dimitrios >> >> P.S. I use Eclipse for Java development in case that makes a difference. > > > >