Here is an example of a swing
applet which uses paintComponent. The paintComponent method is called almost non stop. I can prevent its executing by setting a flag which prevents the
thread from continuing once it enters the paintComponent method - unless there is actually a change in the data.
However I believe there must be a design solution to this issue or perhaps just a better design which does not use paintComponet but instead calls repaint?? All the objects in paintComponet are native - no custom graphics.
Any advice please.
Thanks!
link to code snippet:
http://pastebin.com/f9BEPBc4