Home arrow static arrow Java Programming [Archive] - repaint
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - repaint
This topic has 1 reply on 1 page.

Registered: 11/12/02
Jun 20, 2004 2:40 AM

I'm trying to make a small city simulator game. I have a two-dimensional table (40 * 40), which is drawn on a JPanel using small gifs. Every time when player builds something and the table changes, the program repaints the panel. The problem is that this is very slow. How could I do it faster?

Registered: 7/22/99
Re: repaint  
Jun 20, 2004 3:08 AM (reply 1 of 1)

There are two version of the repaint method: one that repaints the whole component and one that repaints only a certain area of the component. You could try the latter one. See also this article:

This topic has 1 reply on 1 page.