Hello,

Can anyone shed any light on this, please?

I'm puzzled why the paint method is invoked 3 times when a frame is
first displayed.   For small applications this isn't a problem, but if
the paint method is complicated it results in annoying flickering.

To see a demo compile the following StringArt.java and
ApplicationFrame.java from Jonathan Knudsen's book.  On startup I get
"Paint" printed 3 times.  In fact, if you run the ShowOff class from
the same book the image is redrawn three times.  In both cases simply
exposing the window results in a single invocation of paint().

Any pointers, cures or expressions of sympathy gratefully received.

Many thanks,
Richard Everson.

StringArt.java


ApplicationFrame.java


--
Exeter University     [EMAIL PROTECTED]
http://www.dcs.ex.ac.uk/academics/reverson

Reply via email to