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

solaris: Window won't show when pack() is called; resize() necessary to show

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1, 1.1.4
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic, sparc
    • OS:
      solaris_2.5.1, solaris_10

      Description

      On Solaris, if a window is created and pack() is called before show(),
      the window never shows up. If resize() is called instead of pack(), then
      it shows correctly!

      Program below demonstrates. Resproducible on 1.1beta3.


      import java.awt.*;

      class TestWin extends Window
      {
         Label label = new Label("Window Test");
         TestWin(Frame frame)
         {
            super(frame);
            add("Center", label);
            
            // Pack doesn't work for Window. Is this how it's
            // supposed to work or is it a bug?
            pack();

            // setting the size like this works...
            //setSize(200, 200);
         }

         public static void main(String args[]) {
            Frame frame = new Frame("Dummy");
            TestWin tw = new TestWin(frame);
            tw.show();
         }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gsaab Georges Saab
                Reporter:
                amfowler Anne Fowler (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: