import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
public class Main extends JFrame implements ActionListener {
JButton showDialog = new JButton("show dialog");
public Main() {
setLayout(new FlowLayout());
showDialog.addActionListener(this);
add(showDialog);
setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
new Dialogz(this, false);
setEnabled(false);
}
public static void main(String[] args) {
new Main();
}
}
class Dialogz extends JDialog {
JButton close = new JButton("close");
public Dialogz(JFrame owner, bo