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

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Feb 20 09:28:59 UTC 2026


> `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"

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  Variable rename

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29752/files
  - new: https://git.openjdk.org/jdk/pull/29752/files/1bba1b20..08bc35dd

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29752&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29752&range=03-04

  Stats: 20 lines in 1 file changed: 0 ins; 2 del; 18 mod
  Patch: https://git.openjdk.org/jdk/pull/29752.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29752/head:pull/29752

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


More information about the client-libs-dev mailing list