Resizing the height of a north docked window automatically with display screen size

I have a screen which has a window docked to the north and is used for containing navigation buttons and titles, etc. and along with that I have a floating window which is my main screen. I am trying to get the north docked window to adjust its height when the display screen changes. Currently it just adjust its width and not height and I understand docked windows adjust either height or width but not both unlike maximized windows. Is there a way I can get around that? Currently what I am looking for is to have the docked window : floating window = 5:49, that is docked window height = (5/54) of display screen height pixel. Thanks in advance.

I managed to change the height of a docked window by writing to the Size property of the docked window:

import java.awt.Dimension
event.source.parent.parent.parent.parent.size = java.awt.Dimension(800, 200)

I just threw this onto a button on the docked window and watched the height change. Obviously you’ll have to use a different component reference, etc.