Now the "mainFrame" consists of a "drawingPanel" and a "controlPanel" as can be seen above. A flow layout is used to put these two panels from left to right and I use the pack() and setVisible() methods as they should be used.
Previously this produced the correct result, see the file old_java_version.jpg
But now I get a window (frame) which is just not large enough to contain the two panels it seems, see latest_java_version.jpg
The problem occurs on both Windows 7 and Windows 10.