Ability to fix the above problem with the code below,
Rectangle usableBounds = SunGraphicsEnvironment.getUsableBounds(config.getDevice()); setMaximizedBounds(usableBounds); setExtendedState(MAXIMIZED_BOTH);
So getUsableBounds I can get the borders coming out of the taskbar. And so I use setExtendedState(MAXIMIZED_BOTH) , the window is automatically updated when I re-edit / rearrange the taskbar. setExtendedState(MAXIMIZED_BOTH)
source share