• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cancel a call to the repaint() method

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic