RFR: 8140527: JInternalFrame has incorrect title button width [v8]

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Jul 11 03:21:17 UTC 2023


On Mon, 10 Jul 2023 16:19:30 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> May I suggest a simplified version of the test [`InternalFrameTitleButtonTest.java`](https://github.com/aivanov-jdk/jdk/blob/6decd8ae82ed95f0c4bda9089d1e05eb084567b9/test/jdk/javax/swing/JInternalFrame/InternalFrameTitleButtonTest.java)?
> 
> Its `test` method is shorter; I moved the condition to its own method `testButtonSize` where an internal frame title button is passed as well as an offset for width that is different for classic and visual-style-enabled L&F. This also avoids checking which L&F is selected.
> 
> Here's [the diff](https://github.com/aivanov-jdk/jdk/compare/ec2c9ab..6decd8a#diff-f941d2d497179f4da7530480b24522ccd05da02ca24c6e3fa55824d4199529e1) on top of your latest update.
> 
> What do you think?

OK. updated to your version..seems precise..thanks...

> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java line 59:
> 
>> 57: import javax.swing.UIManager;
>> 58: import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
>> 59: import javax.swing.plaf.UIResource;
> 
> I got a different list of imports: see [commit 389cd03](https://github.com/aivanov-jdk/jdk/commit/389cd03c5630e41bc20c60579d6a339590d36fbc).
> 
> The list of imports should be sorted, but it's not sorted here. The imports from `java.beans` should be after `java.awt` rather inside `javax` packages. In OpenJDK, we decided to put internal packages below public packages, so `SwingUtilities2` goes below `javax.*` packages. There's still wildcard import: `TMSchema.*`.
> 
> The [complete sorted list of imports](https://github.com/aivanov-jdk/jdk/blob/389cd03c5630e41bc20c60579d6a339590d36fbc/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java#L28-L68) as produced by *Optimize Imports* command in IDEA.

ok..updated..

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14555#issuecomment-1630040255
PR Review Comment: https://git.openjdk.org/jdk/pull/14555#discussion_r1259125032



More information about the client-libs-dev mailing list