Setting setDefaultLookAndFeelDecorated to true causes the scenery to be handled in appearance; this means that the system looks on both Windows and Mac (now I do not have Linux at hand) the border that you expect from your own window, for example, is saved. Staying away from the taskbar in Windows.
When using the look of Cross Platform, aka Metal, which is used by default in Windows, the Windows version will occupy the entire screen, which makes it look like a full-screen window. On Mac OS, refuses to give up its own title and draws the full metal frame (including the title bar) in its own Mac window.
So, in short, if you want to make sure that the taskbar deserves respect, use the Windows system interface in Windows. You can install it using something like
UIManager.setLookAndFeel((LookAndFeel) Class.forName(UIManager.getCrossPlatformLookAndFeelClassName()).newInstance());
source share