Status: New

Comment #17 on issue 163 by cmal...@pixelzoom.com: PSwing doesn't draw dynamic JComponent properly

Rats. This is still broken. I've been developing and testing on a very fast MacBook Pro. One of my colleagues ran TestPSwingDynamicComponent on a slower Windows
machine, and when that app starts up, none of the Swing stuff outside the
PSwingCanvas is drawn. See attached screenshot, no-draw.png. When he mouses over
areas of the frame outside the canvas, JComponents are drawn.

Looking into PSwingCanvas, I see that the Swing repaint manager is replaced by PSwingRepaintManager. The javadoc for PSwingRepaintManager.addInvalidComponent
indicates that it's called by component.revalidate, and it in turn calls
PSwing.updateBounds.  So what I've done by calling component.revalidate in
updateBounds is to introduce an infinite loop: component.revalidate ->
PSwingRepaintManager.addInvalidComponent -> PSwing.updateBounds ->
component.revalidate -> ... Putting a System.out.prinln at the first line of
PSwing.updateBounds confirms this.

On my speedy Mac, everything still manages to get redraw. But on a slow machine, the
event dispatch queue is hammered, and some things don't draw.

Back to the drawing board.

You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en

Reply via email to