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

JInternalFrame.getNormalBounds() returns normalBounds when maximized state is false instead of bounds

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P3
    • tbd
    • 17
    • client-libs

    Description

      The behavior of getNormallBounds()
      https://download.java.net/java/early_access/jdk17/docs/api/java.desktop/javax/swing/JInternalFrame.html#getNormalBounds()
      is not as per spec when - "JInternalFrame is not in maximized state"

      For example :
      =========
       Rectangle bounds = new Rectangle(96, 97, 98, 99);
              Rectangle nbounds = new Rectangle(196, 197, 198, 199);
              JDesktopPane p = new JDesktopPane();
              FakeJInternalFrame jif = new FakeJInternalFrame();
              p.add(jif);
              jif.setBounds(bounds);
              jif.setNormalBounds(nbounds);
              try {
                  jif.setMaximum(false);
              } catch (PropertyVetoException e) {
                  return Status.failed( "unexpected " + e );
              }
              if (jif.getNormalBounds().equals(jif.getBounds())) {
                  return Status.passed( "OKAY" );
              }

      ======

      Expectation : getNormalBounds() supposed to return bounds, ( As jif is not in maximized state)
      Actual : getNormalBounds() returns the nbounds.


      Attachments

        Activity

          People

            psadhukhan Prasanta Sadhukhan
            kganapureddy Krushnareddy Ganapureddy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: