File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Cancel a call to the repaint() method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Cancel a call to the repaint() method" Watch "Cancel a call to the repaint() method" New topic
Author

Cancel a call to the repaint() method

Amit Agarwal
Ranch Hand

Joined: May 09, 2001
Posts: 92
Hi
I am developing a CAD application and am using a JPanel to display some heavy graphics. When the user draws a new object I have to repaint the JPanel to display the underlying drawing. The repaint method is called quite a no. of times, and the response of the software is very slow.
How can I cancel an incomplete call to the repaint() method of the JPanel if I get another request for repaint().
Also, is it possible that the underlying drawing on the JPanel remains undisturbed even if a new object(eg. line/circle etc.) is being drawn and erased repeatedly on it.
Thanks in advance.
---------------
Amit Agarwal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cancel a call to the repaint() method
 
Similar Threads
Can't clear glassPane
repaint problems DDRAW.DLL
Painting dissappears during resizing (with mouse)
JPanel Problem
public vs private instance variables