preven title bar to show in the part of your rendering screen

when i add title bar to Jframe , my canvas for example lest say 400x400, it only shows 400 x 380, that bar is quiting space to the render screen, do you now how to fix that, i mean when i use title bar if my canvas is 400x400 to be like 400X420,
i think i can add more space, but i want to know if there is a direct/built in way.

thanks in advance.