Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4256578

Kestrel: showInternal* methods are not functioning properly

XMLWordPrintable

      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

            hgajewsksunw Hania Gajewska (Inactive)
            kurosaki Kenichi Kurosaki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: