-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.3.0
-
sparc
-
solaris_2.6
Using the code listed below, showInternalConfirmDialog always return
the value -1 and disappears as soon as its dialog comes up.
Running on JDK-1.2-V, this code works properly as expected.
import java.awt.*;
import javax.swing.*;
public class Test extends JFrame {
public Test() {
super("Test");
}
public static void main(String args[]) {
Test test = new Test();
test.run(args, System.err, System.out);
}
public void run(String args[], java.io.PrintStream log, java.io.PrintStream out) {
JDesktopPane dp = new JDesktopPane();
JOptionPane op = new JOptionPane();
JInternalFrame iframe = op.createInternalFrame(dp, "iframe");
int result = 0;
setBounds(100, 100, 300, 300);
setVisible(true);
result = op.showInternalConfirmDialog(getContentPane(), "test");
out.println("result: " + Integer.toString(result));
quit();
}
void quit() {
dispose();
System.exit(0);
}
}
kenichi.kurosaki@Japan 1999-07-23
the value -1 and disappears as soon as its dialog comes up.
Running on JDK-1.2-V, this code works properly as expected.
import java.awt.*;
import javax.swing.*;
public class Test extends JFrame {
public Test() {
super("Test");
}
public static void main(String args[]) {
Test test = new Test();
test.run(args, System.err, System.out);
}
public void run(String args[], java.io.PrintStream log, java.io.PrintStream out) {
JDesktopPane dp = new JDesktopPane();
JOptionPane op = new JOptionPane();
JInternalFrame iframe = op.createInternalFrame(dp, "iframe");
int result = 0;
setBounds(100, 100, 300, 300);
setVisible(true);
result = op.showInternalConfirmDialog(getContentPane(), "test");
out.println("result: " + Integer.toString(result));
quit();
}
void quit() {
dispose();
System.exit(0);
}
}
kenichi.kurosaki@Japan 1999-07-23
- duplicates
-
JDK-4265783 JOptionPane needs to setVisible(true) on the internal frames it creates
-
- Resolved
-
- relates to
-
JDK-4266981 JOptionPane.showInternalMessageDialog() methods are not modal.
-
- Closed
-