When I click on a minimized dockable button the flap window is correct. Close the flap window and resize the JFrame.
Open the flap window again and it has still the previous size,
which is not correct.
When you resize the JFrame whilst the flap window is open, the flap window is correctly resized
setVisible size = java.awt.Dimension[width=594,height=158] // visible(true) after resize of JFrame. Width has been changed
size = java.awt.Dimension[width=451,height=158]
It works when I add the following code in FlapWindow:
public void setVisible(boolean flag)
{
if (flag)
updateBounds();
super.setVisible(flag);
}
That just means that the second size is somehow ignored?
I mean this one: “size = java.awt.Dimension[width=451,height=158]”.
Strange.
Well since your fix works I just copy it :-/
(Btw. That is not the first time these windows cause problem. I even had once the issue that the “setVisible( false )” command was just ignored. I suspect there were some race conditions but I could never prove it.)
What happens if you add a “validate” in “updateBounds”? At this location:
Dockable dockable = displayer == null ? null : displayer.getDockable();
if( dockable != null ){
validate(); // <-- here```
Normally Containers do not get validated as long as they are invisible.