> Hi
> when a jframe show a modal jdialog and that jdialog show another
[quoted text clipped - 3 lines]
> thanks
> from Peter (cmk128@hotmail.com)
Peter:
I don't see your problem with my test code. Please post a compilable
example that demonstrates your problem.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class test7 {
public static void main(String[] args) {
Runnable r = new Runnable() {
public void run() {
final JFrame f = new JFrame("test7");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JButton b = new JButton("Open Modal Dialog");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
final JDialog modalDialog = new
JDialog(f,"Modal",true);
JButton b = new JButton("Open Non-Modal Dialog");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
JDialog nonModalDialog =
new
JDialog(modalDialog,"Non-Modal",false);
JLabel l = new JLabel("Non-Modal Dialog");
nonModalDialog.add(l);
nonModalDialog.pack();
nonModalDialog.setVisible(true);
}
});
modalDialog.add(b);
modalDialog.pack();
modalDialog.setVisible(true);
}
});
f.add(b);
f.pack();
f.setVisible(true);
}
};
EventQueue.invokeLater(r);
}
}

Signature
Knute Johnson
email s/nospam/knute/
cmk128@hotmail.com - 15 May 2006 03:19 GMT
Hi Johnson
I fixed the problem, because i was calling the method like this:
new JDialog().setVisible(true);
If i change to this
new JDialog(this).setVisible(true);
It will be fixed.
thanks