RFR: 8372103: Metal JButton doesn't show focus if no text or icon [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Nov 20 09:33:44 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" />

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

  Initialisation fix

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28408/files
  - new: https://git.openjdk.org/jdk/pull/28408/files/b85fdf4a..45cf15ec

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28408&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28408&range=00-01

  Stats: 1 line in 1 file changed: 0 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