<Swing Dev> synchronization of invalidateLayout
Alan Snyder
javalists at cbfiddle.com
Wed Feb 3 21:05:45 UTC 2021
It is mentioned in the documentation of BoxLayout.invalidateLayout() that this method may be called on a thread other than the UI thread.
Is this still the case? If it is, shouldn’t this fact be documented more prominently?
I notice that OverlayLayout does not synchronize.
I also notice that GroupLayout synchronizes in the invalidateLayout method, but nowhere else, which seems useless, unless there is some subtlety in Java synchronization that I am unaware of.
As far as I can tell, the remaining implementations of this method in the JDK are empty.
Alan
More information about the swing-dev
mailing list