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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.1
    • 1.0.2
    • client-libs
    • 1.1fcs
    • generic
    • windows_95
    • Not verified

      > > 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");
      }
      }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: