On Thu, 5 Mar 2026 01:17:05 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> 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 This pull request has now been integrated. Changeset: 3c09c2cd Author: Prasanta Sadhukhan <[email protected]> URL: https://git.openjdk.org/jdk/commit/3c09c2cd2d8e93844f366a3c9e2e3790ecc0d029 Stats: 79 lines in 2 files changed: 79 ins; 0 del; 0 mod 8267961: JInternalFrame.getNormalBounds() returns normalBounds when maximized state is false instead of bounds Reviewed-by: tr, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/30065
