On Tue, 12 Jul 2022 18:16:06 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:
> When a JComboBox is editable, the button segment of the combo box is > misaligned vertically and has a different height. This change fixes these > issues and adds a manual test that checks the appearance of an editable and > non-editable JComboBox. > > One of the discussions revolving this issue is the native macOS appearance of > editable JComboBoxes. After looking through native macOS apps, the only one > found is in System Preferences > Date & Time. The problem here is that the > native equivalent found here uses a blue button with a single down arrow as > the button's symbol. The current swing implementation uses a white button > with an up & down arrow symbol for the button. A JRS widget button that has > this blue button with a single downward arrow exists but does not support > text fields. > > As such, I believe the best fix for this issue is to mainly fix the alignment > and sizing issue. I looked through Apple's documentation for these UI > elements but editable JComboBoxes aren't specifically listed anywhere. > Similarly, there's barely any editable JComboBoxes used in native mac apps > (only the date & time). So, I don't think it's a major issue if JComboBox > does not exactly match the example found in Date & Time. Changes requested by honkar (Author). test/jdk/javax/swing/JComboBox/JComboBoxBorderTest.java line 59: > 57: // > 58: // } > 59: Might have missed removing commented lines test/jdk/javax/swing/JComboBox/JComboBoxBorderTest.java line 84: > 82: PassFailJFrame.positionTestFrame(frame, > 83: PassFailJFrame.Position.HORIZONTAL); > 84: }); These methods need to be changed to `addTestWindow `and `positionTestWindow` based on the recently integrated changes to PassFailJFrame. https://github.com/openjdk/jdk/blob/d9ca438d06166f153d11bb55c9ec672fc63c0e9e/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java#L294 ------------- PR: https://git.openjdk.org/jdk/pull/9473