Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java AWT doLayout(), repaint() delay problems 1

Status
Not open for further replies.

clax99

Programmer
Oct 29, 2001
23
US
I'm working on a monopoly type application, and im having problems with my dice, which are two randomly chosen JButtons that have standard dice images as icons. Clicking on either starts the "roll". After obtaining the two random JButtons, I remove the two former JButtons from the panel, then add the two new JButtons. My problem is that after doing this, I call doLayout() on the dice panel, but the new dice don't show up immedietaly; sometimes it takes up to 3 seconds to show the new dice. Is there any delay from the OS?;I've tried thousands of combinations involving doLayout(), repaint(), and such. Pplease help with any suggestions, as I'm new to the AWT.
 
Evidently you are using Swing and not Awt. Snippets of the code would help in solving the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top