On Tue, 17 Feb 2026 07:46:06 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> `JProgressBar` is not printed if JDK 1.1 printing API is used.
> JDK1.1 printing API `PrintJob ` doesn't support `Graphics2D`. 
> JProgressBar seems to require Graphics2D as `BasicProgressBarUI` needs 
> Graphics2D to do
> `g2.setStroke(new BasicStroke(...))`
> 
> Fix is made to not rely on setStroke for non-Graphics2D printing case and 
> also not to clip progress string
> Also, a null pagerange check is added for PrintJobDelegate as we reset 
> PageRanges if range is not set so to prevent NPE when "All" is used in print 
> dialog instead of "Pages from"
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: d8d881b9
Author:    Prasanta Sadhukhan <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/d8d881b98761640b031107e9ab5db4345f297585
Stats:     256 lines in 5 files changed: 184 ins; 9 del; 63 mod

6328248: JProgessBar doesn't show if printed on paper with PrintJob (1.1 
Graphics API)

Reviewed-by: prr, kizune

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

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

Reply via email to