I've created a program to handle directed graphs. I also used a raster to display the graph. (I'm still working on cleaning it up, although it should be sufficient to show the computations.)
I want a pause in the graphing, so as the items change color during the search it's obvious. However, the pause causes the graphing to stop. Anyone know why that'd be? To be honest, I have never worked with Thread before and I don't know what it does to running processes.
Thanks for any ideas.
The code snippet in question:
public void showEdge (Raster canvas, Vertex target, Color c) {
[...]
canvas.setLine (x1,y2,x2,y2,c);
try {
Thread.sleep (1000); }
catch (InterruptedException e) {
System.out.println ("Problem with the pause.");
}
}