<Swing Dev> RFR: 8269951: [macos] Focus not painted in JButton when setBorderPainted(false) is invoked [v4]

Alexander Zuev kizune at openjdk.java.net
Tue Aug 17 06:09:51 UTC 2021


On Mon, 16 Aug 2021 23:46:18 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> You can trace the usage of graphics.getColor() for example in AquaMenuItemUI/WindowsMenuUI/BevelBorder/etc to check that the old color property is usually saved and then restored.

A few lines above paintFocus() is called there is a section that sets color to something different in case of opaque button and that does not affect the next step - text painting - since text painter will grab text color and set the graphics draw color to it. However in the interest of moving forward i will ad saving the color - after al it is not a performance critical task.

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

PR: https://git.openjdk.java.net/jdk/pull/5082


More information about the swing-dev mailing list