Well, for one, what do you do about Window? Disallow showing them? That’d break backward compatibility.
FYI, popup menus are undecorated windows (when they extend beyond toplevel bounds). And because of the wonderful swing architecture you can put whatever you want into a menu.
Another thing with placing warning into the title bar that I can see is that on Windows it may not be visible in some themes.
Also, what do you do about non-resizeable windows? If the title which includes the warning doesn’t fit into the title bar, then what? Make window resizeable? But it’ll break all kinds of applications which don’t expect to be resized.
So, it ain’t that easy.
Dmitri