Results 1 to 2 of 2
- 11-03-2013, 08:45 PM #1Member
- Join Date
- Oct 2013
- Rep Power
How can I paint an oval or a rectangle on a panel with a certain amount of time lag?
I have made a program that lets you draw a graph on a panel, using MouseListener methods. And now i have to simulate a Breadth First Search Search on that graph. By changing the color of the nodes as i traverse the graph. One node at a time. Suppose i have 3 nodes say 1,2,3. and My BFS says that I have to traverse from 2,3,1. So i want 2's color to change first then 3's color and then 1's but there has to be a significant time delay between the color changing of the nodes. If i use a normal loop and paint the nodes in my paintcomponent method all the nodes are colored at the same time. :/
Any ideas, how to do this?
- 11-03-2013, 09:47 PM #2
- By noobie_nate in forum Java 2DReplies: 2Last Post: 06-05-2013, 05:45 PM
- By skiabox in forum AWT / SwingReplies: 3Last Post: 03-21-2012, 01:24 PM
- By Nakinsige in forum New To JavaReplies: 5Last Post: 02-22-2012, 02:49 PM
- By radhi in forum Java 2DReplies: 5Last Post: 10-05-2010, 08:58 AM
- By nicnicnic in forum Java 2DReplies: 3Last Post: 11-22-2009, 08:08 AM