On Tue, 28 Feb 2023 00:20:30 GMT, Damon Nguyen <[email protected]> wrote:
>> src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java line
>> 189:
>>
>>> 187:
>>> 188: int popupBoundsY = comboBox.getBounds().height;
>>> 189: if (comboBox.isEditable() && comboBox.getBorder() != null) {
>>
>> Does it not affect a non-editable combo box with with a border that has
>> large insets?
>
> In testing, it does also affect this case. In the normal use cases in
> testing, this editable Aqua comboBox with a TitledBorder seemed to be the
> only problematic one, but with custom large borders, this seems to also be an
> issue.
>
> I recently discussed with @lawrence-andrew and learned that in the setBorder
> doc for JComponent, UI components are not fully supported with borders. It is
> instead recommended to place the component in a JPanel. I think this is one
> of those cases, but the fix in this PR fixes the found issue for the case of
> an editable Aqua comboBox with a border.
>
> If you could give insights on this Lawrence, that'd be appreciated as well.
Actually I see the same behavior (ComboBox's selected item overlapped with
popup menu) for non-editable ComboBox with or without your fix(whether it has a
border or not).
We can probably fix it along with this issue.
[JDK_8302558.java.txt](https://github.com/openjdk/jdk/files/10962183/JDK_8302558.java.txt)
-------------
PR: https://git.openjdk.org/jdk/pull/12750