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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 17
    • Component/s: client-libs

      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.


            Assignee:
            Prasanta Sadhukhan
            Reporter:
            Krushnareddy Ganapureddy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: