Seems I missed a crucial part of the Observer mechanism, apparently one has to call setChanged()
before notifyObservers()
. But the thing is, setChanged()
is protected and thus only visible to any subclass of Observable.
So I guess it's not meant to be used in the fashion I tried to use it, but the hackish subclass below will work...
public class MyObservable extends Observable{
@Override
public boolean hasChanged() {
return true; //super.hasChanged();
}
}