If you need to extend JDialog, the class has two protected methods of importance:
protected void dialogInit() protected JRootPane createRootPane()