Results 1 to 2 of 2
- 01-11-2011, 03:16 AM #1Member
- Join Date
- Jan 2011
- Rep Power
Help with a Bank graphic simulation
Hi everyone. I don't speek too much english, so I hope you understand me. I need help with this program. Basically it shows a bank environment with 3 counters? and a line. The thing is that I have to represent how people in the line go to the counters and after a random time they leave. the line is supposed to be the representation of a queue and each counter will be a thread. these threads are synchronized so only one of them can take one element from the queue (line) at a time. At the start the queue is empty and i have a button that each time i press it an element is pushed into the queue and in that moment if there's a counter available, it takes that element.
Well my problem is in the representation. I can show the environment of the bank but i dont know how to make people (just circles) to appear and go to their counters respectively and every time i press the button add a person (circle) at the tail of the line.
So basically, i dont know how to draw a new circle in the jpane at the tail of the line and, when his moment comes, to make it move to a specific location in the jpane (to a counter). Could anyone help me with this.. please, need it with urgency!!!!:D
- 01-11-2011, 09:19 AM #2
These tutorials might help
Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)
Trail: 2D Graphics (The Java™ Tutorials)
please, need it with urgency!!!!
- By HPcompaq256 in forum New To JavaReplies: 11Last Post: 02-26-2010, 10:05 PM
- By mgm2010 in forum New To JavaReplies: 2Last Post: 07-31-2009, 06:45 PM
- By dotnet007 in forum New To JavaReplies: 10Last Post: 05-13-2008, 09:30 AM
- By Eranga in forum Suggestions & FeedbackReplies: 2Last Post: 01-01-2008, 06:23 AM
- By subwoofer717 in forum Advanced JavaReplies: 1Last Post: 12-25-2007, 10:08 AM