Skip to main content

LockableUi (BusyPainterUI)

No replies
klaasjanelzinga
Offline
Joined: 2007-06-10

I think there's a mutual exclusion bug in the LockableDemo (https://jxlayer.dev.java.net/source/browse/jxlayer/trunk/src/demo/org/jd...).

The BusyPainterUI must syncronize the setLocked and the actionPerformed methods. If the setLocked is called with false there must be a call to setDirty(true).

Otherwise there would be a race condition between the setLocked(...) and the isLocked in the paintLayer. Perhaps the paintLayer must be synced but my knowledge of the base class is not enough to judge this.