Integrated: 8372103: Metal JButton doesn't show focus if no text or icon

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Nov 25 11:42:59 UTC 2025


On Thu, 20 Nov 2025 08:06:01 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

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

This pull request has now been integrated.

Changeset: 49176e32
Author:    Prasanta Sadhukhan <psadhukhan at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/49176e322bbb9ed1ef2f534b949b937770b54162
Stats:     82 lines in 2 files changed: 81 ins; 0 del; 1 mod

8372103: Metal JButton doesn't show focus if no text or icon

Reviewed-by: azvegint, tr

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

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


More information about the client-libs-dev mailing list