Details
-
Enhancement
-
Resolution: Unresolved
-
P3
-
17
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.
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.