Prefuse freezes JFrame

185 views Asked by At

We are calling web services to gather information for a graph with about 1500 nodes. We are displaying the graph in Prefuse while it continually is adding nodes and edges. Most of the time this seems to work great, but every once in awhile the entire app freezes, and the only way to recover is to kill the application and start over. No exceptions are printed out when this happens. On other occasions, I do fairly often see "IllegalArgumentException: Invalid row index: -1", but this doesn't seem to be associated with the freezing of the app.

I saw a related questions about freezing in applets, but our app is running in a JFrame, not an applet. Just in case this was our problem, we tried calling ActivityManager.stopThread() (could not find the kill method) in various places in our code. This doesn't seem to have much if any difference.

Is there a thread safe way for prefuse to display the graph while editing the graph?

1

There are 1 answers

1
camickr On

Is there a thread safe way to display the graph while editing the graph?

All updates to the GUI must be done on the EDT. Use a SwingWorker.

See Concurrency in Swing for more information.