Why method does dispose() of DialogWrapper call setRootPane(new JRootPane()) ?

Why method does dispose() of DialogWrapper call myDialog.setRootPane(new JRootPane()); inside? It prevents dialog with the same content to be shown again. Does anybody know that?

Please sign in to leave a comment.