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

REGRESSION: Cannot create iconified JFrame with setResizable(false) and pack()

XMLWordPrintable

    • b23
    • x86
    • windows_nt



        Name: jk109818 Date: 04/21/2003


        FULL PRODUCT VERSION :
        java version "1.4.2-beta"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
        Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)

        FULL OS VERSION :
        Windows NT Version 4.0

        A DESCRIPTION OF THE PROBLEM :
        A frame cannot be opened initially minimized under the following two scenarios:
        1) If setResizable(false) is called for the frame.
        2) If pack() is called in a certain sequence.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Execute the code attached below

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        Expected frame to be opened minimized
        Frame was not opened minimized

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        // test 1
        import java.awt.*;
        import java.awt.event.*;
        import javax.swing.*;

        public class TestFrame
        {
          public static void main(String []s)
          {
            JFrame frame = new JFrame();
            frame.setResizable(false);
            frame.setState(JFrame.ICONIFIED);
            frame.setBounds(100, 100, 100, 100);
            frame.setVisible(true);
          }
        }

        // test 2
        import java.awt.*;
        import java.awt.event.*;
        import javax.swing.*;

        public class TestFrame
        {
          public static void main(String []s)
          {
            JFrame frame = new JFrame();
            frame.setState(JFrame.ICONIFIED);
            frame.setBounds(100, 100, 100, 100);
            frame.pack();
            frame.setVisible(true);
          }
        }
        ---------- END SOURCE ----------

        Release Regression From : 1.4.1_01
        The above release value was the last known release where this
        bug was known to work. Since then there has been a regression.

        (Review ID: 184502)
        ======================================================================

              uwesunw Uwe Uwe (Inactive)
              jkimsunw Jeffrey Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: