The behavior of getNormallBounds() is not as per spec when - "JInternalFrame is not in maximized state" As per JinternalFrame.getNormalBounds [spec](https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/javax/swing/JInternalFrame.html#getNormalBounds())
> If the JInternalFrame is not in maximized state, getNormalBounds() returns > getBounds() but it seems in certain cases it can return cached normal bounds value and not getBounds() value. Fix is made to check if internalFrame is unmaximized, the normalBounds is reset so that it can return getBounds() value in all cases https://github.com/openjdk/jdk/blob/ff8b0ac048f6a6f75d1ad738d3354890d76d8128/src/java.desktop/share/classes/javax/swing/JInternalFrame.java#L1336-L1347 An existing test is also rectified to honour this spec ------------- Commit messages: - jcheck - 8267961: JInternalFrame.getNormalBounds() returns normalBounds when maximized state is false instead of bounds Changes: https://git.openjdk.org/jdk/pull/30065/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30065&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8267961 Stats: 86 lines in 3 files changed: 80 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/30065.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30065/head:pull/30065 PR: https://git.openjdk.org/jdk/pull/30065
