Integrated: 8322135: Printing JTable in Windows L&F throws InternalError: HTHEME is null

Tejesh R tr at openjdk.org
Thu Apr 25 04:34:36 UTC 2024


On Wed, 10 Apr 2024 04:32:53 GMT, Tejesh R <tr at openjdk.org> wrote:

> Getting a theme for particular dpi failed in windows L&F during print test. Before [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) fix, theme was independent of DPI. After the fix (https://github.com/openjdk/jdk/commit/a63afa4aa62863d1a199a0fb7d2f56ff8fcd04fd) getting a theme in Windows L&F became dependent on DPI. Now it works fine in paint to a frame or window but for printing the DPI is computed with scaling factor which might not be w.r.t set of connected monitors and hence error is returned according to [this from windows document](https://learn.microsoft.com/en-us/windows/win32/api/uxtheme/nf-uxtheme-openthemedatafordpi). 
> The suggested fix is to handle printer cases with default dpi since in error condition 0 is returned with `openThemeImpl(widget, dpi)`. The fix seems to be working fine without causing any regression (Tested in CI systems and also the affected tests).

This pull request has now been integrated.

Changeset: 21480a7a
Author:    Tejesh R <tr at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/21480a7ae8dce67cf3a844d8caafb0b96c37ac0e
Stats:     17 lines in 3 files changed: 9 ins; 0 del; 8 mod

8322135: Printing JTable in Windows L&F throws InternalError: HTHEME is null

Reviewed-by: abhiscxk, honkar, aivanov

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

PR: https://git.openjdk.org/jdk/pull/18706


More information about the client-libs-dev mailing list