RFR: 8372103: Metal JButton doesn't show focus if no text or icon
Prasanta Sadhukhan
psadhukhan at openjdk.org
Thu Nov 20 08:20:02 UTC 2025
If a JButton in Metal Look&Feel has no text or icon, it will not show an indicator when selected.
Fix is made to show a focus rectangle even for empty button
Before fix
<img width="347" height="300" alt="image" src="https://github.com/user-attachments/assets/d03c64b2-8570-4585-a3a9-732a9c98d880" />
After fix
<img width="350" height="365" alt="image" src="https://github.com/user-attachments/assets/98b4e6c2-1976-4f83-bff3-5ff30a6e04d8" />
-------------
Commit messages:
- jcheck
- 8372103: Metal JButton doesn't show focus if no text or icon
Changes: https://git.openjdk.org/jdk/pull/28408/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28408&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8372103
Stats: 82 lines in 2 files changed: 81 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/28408.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28408/head:pull/28408
PR: https://git.openjdk.org/jdk/pull/28408
More information about the client-libs-dev
mailing list