In Java SE 6 the behavior of both modal and modeless dialog boxes has . a Dialog instance automatically becomes the root of the document if it has no owner..