FlatLaf
FlatLaf copied to clipboard
Window paint incomplete
When I set a new L&F at runtime, some windows paint is incomplete and needs to be opened and closed two times to be fully painted with the new theme.
Does it work without FlatAnimatedLafChange
?
What is disabledLayer
?
With FlatAnimatedLafChange
and disabledLayer
lines removed it still doesn't work.
disabledLayer
is a simple JComponent
that will be set as GlassPane on top of the frame to block all mouse and keyboard events until all UI elements are updated with new theme.
The "JSignPdf" window looks OK on your screenshot. It the problem only in the "TSA ..." dialog?
Yes, the problem appears on frames and dialogs that were already created and not visible, but if I open and close each of them two or three times then they get fixed and show correct theme.
You should know that only those components are updated that are in windows.
See for(Window w : Window.getWindows())
.
Components that are created, but not added to a window, are not updated. If you later show such components, the have the wrong look.
It's an instance of JDialog
and is member of a class of type JFrame
.
Very strange... 😕
When the TSA dialog is shown wrong, does it always look like in the first screenshot? Or random?
Is the TSA dialog repainted correctly if you resize the dialog?
It's random, and if I resize the window just a little then the theme is applied instantly to it. I tested it on OpenJDK 8, 11 and 17 and got same result.
It seems to occur only on Linux, in my case Manjaro KDE, but on Windows 10 with both OpenJDK 15 and 17 the problem doesn't exist.