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

Win32: calling pack on a dialog doesn't always set insets right.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.1
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.1fcs
    • CPU:
      generic
    • OS:
      windows_95
    • Verification:
      Not verified

      Description

      > > Also, calling pack() on a dialog seems to be have a race condition.
      > > It doesn't always get the insets() right. I noticed that if you
      > > write the following you get reasonable semantics:
      > >
      > > hide();
      > > pack();
      > > sleep(100);
      > > pack();
      >
      > This *should* be fixed, but I'd love a test case if you have it. I
      > rewrote the way Insets are handled to track the Frame's state, and have
      > a routine that verifies the Frame's state (including its Insets) whenever
      > a native method is called (if you enable an AWT debugging property). As
      > you well know, we have a lousy test suite, so I'm soliciting any and all
      > for samples demonstrating 1.0.2 problems to make sure they are fixed.

      Ok. I've written a simple example that works on Solaris but gets the
      dialog size completely wrong on the PC. Here it is:


      import java.io.*;
      import java.awt.*;

      class Test {
      public static void main(String argv[]) {
      // Create a base frame
      Frame frm = new Frame("hello");
      frm.reshape(100, 100, 100, 100);
      frm.show();

      // Create the dialog
      Dialog t = new Dialog(frm, true);
      t.add("Center", new Label("This the center"));
      t.add("South", new Button("ok"));
      t.pack();
      t.show();
      System.out.println("done");
      }
      }

        Attachments

          Activity

            People

            Assignee:
            tballsunw Tom Ball (Inactive)
            Reporter:
            tballsunw Tom Ball (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: