I have a JPanel inside BorderLayout.CENTER
The JPanel has a Grid Layout, and I want it to expand with the CENTER for its width, but the height must stop at a maximum
The FLowLayout layout manager does not redistribute free space; it uses each component's preferred size (see FlowLayout documentation in the Java API).
I personally would change your wrapper panel's layout manager to a GridBagLayout, and add your centerPanel into it, specify a proper GridBagConstraints object to handle the space distribution as you need.