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

slow display of dialog boxes in jdk1.1.7

    XMLWordPrintable

Details

    • b01
    • sparc
    • solaris_2.5.1

    Description

      When you run the following program on either Solaris or Digital Unix, the time
      it takes for the dialog box to pop up is significantly slower with JDK 117 than
      with JDK 116. Just run the program, click on "Modal", and then see how long it takes for the Dialog box to pop up.

      With JDK116, the Dialog box pops up instantly. With JDK117, it takes several
      seconds.

      import java.awt.*;
      import java.awt.event.*;

      class Main extends Frame {
              Frame mainWindow;
              Main() {
                      Button b;
                      mainWindow = new Frame ("Dialog Example");
                      b = new Button("Modal");
                      mainWindow.add("West", b);
                      b.addActionListener (new MainDialog (mainWindow));
                      mainWindow.pack();
                      mainWindow.show();
              }

              static public void main(String[] args) {
                      new Main();
              }
      }


      class MainDialog implements ActionListener {
              Dialog dialog;
              Frame mainWindow;

              public MainDialog (Frame mainWindow) {
                      this.mainWindow = mainWindow;
              }
              public void actionPerformed (ActionEvent e) {
                      dialog = new Dialog (mainWindow, true);
                      dialog.add ("Center", new Button ("Quit"));
                      dialog.pack ();
                      dialog.show ();
              }
      }

      Attachments

        Issue Links

          Activity

            People

              mbronsonsunw Mike Bronson (Inactive)
              jbenoit Jonathan Benoit (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: