hello everybody,
ive devoloped an awt application in java, i want to call the paint() for drawing sytem time on a image through Graphics.drawString(String,int,int);
now i want to refresh the time for each second by calling repaint(), but whats my problem is, each time i call repaint() the image i drawn using the paint() is being repainted. so i want to overload the paint() so that each time the image is not repainted.
please anyone help me in this.
thnx n regards.
ravi.v

try this:

public void update (Graphics page)
{
paint(page);
}

That way, instead of updating the whole page (which erases first), it just draws to it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.