
The black is JFrame content and the red one is JPanel’s.
This happens a lot when resizing the JFrame. A little less, when resizing the frame from upper left corner, but still happens.
The panel is not able to keep up with the frame change.
Why, is it “fixable” ?
Thanks
The following lines provide the desired behavior on a JFrame: