create JDialog only one time,
create that as local variable
change myDialog.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);, then button in the toolbar (with X) to hide JDialog too
then you can to call from actionPerformed only myDialog.setVisible(true) and ModalityType too if required, setVisible shoud be wrapped in invokeLater(), instead of creating a new instance (new Dialogz(this, true); )
JButton placed in JDialog will be called only myDialog.setVisible(false)