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

adding and removing menubars from frames causes window behaves nonsensically

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.1.5
    • 1.1
    • client-libs
    • None
    • 1.1.5
    • sparc
    • solaris_2.5
    • Verified

        [never 3 dec 96]
        If you add and remove the menubar from a frame repeatedly under jdk1.1 on Solaris it behaves strangely. I've got a test program which illustrates this in ~never/java/src/frame.java. Here's how it behaves.
        1. Start without a menubar. The top inset is reported as 25. (I think this is wrong for CDE. It actually seems to be 23. I think there might way to ask the Motif window manager what the insets are but I'm not sure how.)
        2. Add the menubar and the top inset becomes 56.
        3. Remove the menubar and the window shrinks up but now the top inset is 26 instead of 25.
        4. Add the menubar and the top inset is now 57 instead of 56. The window has grown.
        5. Remove the menubar and the window stays the same size and the contents move to the top of the window. There's now a big empty space near the bottom that's the size of the menubar. Also the insets say that the top is still 57.
        6. Add it back and everything looks normal except that the top inset is still 57.
        7. Remove it and there's now an empty space where the menubar was. From now on the window won't change size and insets won't change but the menubar space will always be taken up whether there's a menubar there or not. If you resize the window the contents will expand to fill that space but when you add the menubar back the contents will shink up.

        There used to be a bunch of other anomalies but they seem to have been fixed. Also the test program for Frame.remove from The Java Class Libraries: An Annotated Reference also the shows this problem though it doesn't look at the insets.

              pyoung Paul Young (Inactive)
              never Tom Rodriguez
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: