RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v2]

Damon Nguyen dnguyen at openjdk.org
Wed Jul 13 22:33:01 UTC 2022


On Wed, 13 Jul 2022 11:31:07 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Can you please show before and after fix image of the editable combobox? It seems the border around the button makes it feel it's still not aligned properly which gives the impression that the button is bigger than textfield. Probably we can do away with the button border, if we can, in case we cannot draw the border around the whole textfield+button.
> 
> Also, I think if you try with different font size e.g. `comboBox.setFont(new Font("Serif", Font.PLAIN, 30));`
> 
> you will again see the editable combobox button height is not matching textfield height whereas non editable one it is aligned..

Local test without the fix:
<img width="182" alt="Local Test Without Fix" src="https://user-images.githubusercontent.com/96267980/178778291-805ed3e0-fed2-458d-9ae6-65ace37f8ef0.png">

Local test with the fix:
<img width="182" alt="Local Test With Alignment Fix" src="https://user-images.githubusercontent.com/96267980/178778425-5a8bf95a-014f-46dd-a018-29fd37b2fe39.png">

I have additional images on JBS, but I'll gladly post them here as well.

I'm looking into the text size and the borders. The sizing of the button seems to also be affected by a component size value, so I'm adjusting that instead.

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

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



More information about the client-libs-dev mailing list