Hi I want to repaint a page in applet. When that page is repainted, i want part of that page not to be repainted. That should be static. Is there any way to separate the applet window as so many parts and to repaint the necessary parts only?

Pls provide me the way to this

Recommended Answers

All 2 Replies

When the page is repainted the whole thing will be repainted, so spliting into sections will not help. Somehow, you'll have to keep static variables to tell your applet what to paint. That shouldn't be so hard.

Why don't you want a special part of the Applet not to be repainted? I am just asking, coz I am curious...

Basically, you could do this by overwriting the repaint() method of your component. Instead of calling super.repaint(), call repaint(Rectangle r) or a similar function as offten as needed to repaint all areas of the component, which should be repainted.

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.