JDK-8226472 : [macos] AquaLookAndFeel: JComboBox dropdown briefly shows previous JComboBox contents.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2019-06-19
  • Updated: 2020-03-09
  • Resolved: 2020-03-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 15
15Resolved
Related Reports
Duplicate :  
Description
ADDITIONAL SYSTEM INFORMATION :
(Tested with multiple versions of Java from 8 through 14).

scrappy:Documents jimdouglas$ jdk-14.jdk/Contents/Home/bin/java -version
openjdk version "14-ea" 2020-03-17
OpenJDK Runtime Environment (build 14-ea+1-1)
OpenJDK 64-Bit Server VM (build 14-ea+1-1, mixed mode, sharing)
scrappy:Documents jimdouglas$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.5
BuildVersion:	18F132
scrappy:Documents jimdouglas$ 

A DESCRIPTION OF THE PROBLEM :
When opening a JComboBox component, it briefly shows the contents of the previously opened JComboBox. 

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The best way to see this is to capture a video of the interaction (CMD+SHIFT+5), spend 10-15 seconds cycling through the JComboBox components, then step through the video frame by frame using the right and left arrow keys.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When opening a JComboBox, I'd expect to see the contents of that specific list, with no rendering artifacts.
ACTUAL -
This effect is extremely subtle, but reasonably consistent; most of the time, opening the JComboBox very briefly flashes the contents of the previously opened list before switching over to the correct list.

---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class ComboBox extends JPanel
{
    public ComboBox()
    {
        String[] x1 = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j" };
        String[] x2 = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
        String[] x3 = { "k", "l", "m", "n", "o", "p", "q", "r", "s", "t" };
 
        JComboBox cb1 = new JComboBox(x1);
        JComboBox cb2 = new JComboBox(x2);
        JComboBox cb3 = new JComboBox(x3);
 
        add(cb1);
        add(cb2);
        add(cb3);

        setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
    }
 
    public static void main(String[] args)
    {
        SwingUtilities.invokeLater(new Runnable()
        {
            public void run()
            {
                System.out.println(UIManager.getLookAndFeel());
                JFrame frame = new JFrame("ComboBox");
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                JComponent newContentPane = new ComboBox();
                newContentPane.setOpaque(true);
                frame.setContentPane(newContentPane);
                frame.pack();
                frame.setVisible(true);
            }
        });
    }
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
None.

FREQUENCY : always



Comments
This issue is not reproducible in 10.13.6. Closing as this is duplicate of https://bugs.openjdk.java.net/browse/JDK-8040630
09-03-2020

[~trebari] what is Introduced in Release?
06-03-2020

I think this is duplicate of this one: https://bugs.openjdk.java.net/browse/JDK-8040630 https://mail.openjdk.java.net/pipermail/awt-dev/2020-February/015694.html
07-02-2020

[~trebari] any update on 8u and 11u check?
07-02-2020

From the description looks like it is introduced in jdk build 14-ea+1-1. i am not able to reproduce it with both jdk 8 and 14 in Mac 10.13.6 .To know whether it is regression or not , we need to test it on Mac 10.14.5 with jdk 8 and 11.
03-12-2019

[~trebari] so this is a regression intorduced in JDK 14, right? in which build #?
03-12-2019

It is introduced in jdk-14 in Mac OS 10.14.5, but i am not able to reproduce it with jdk 14 in Mac OS 10.13.6.
03-12-2019

[~trebari] in what release this is introduced? 8? 11? 14?
03-12-2019

[~pardesha]]Can you check whether it is reproducible with jdk8 and mac OS version 10.14.5 ?
14-10-2019

Submitter has shared an attached test case with a video depicting the behavior. ========== Here's a small video showing a test run, with a screen capture taken from stepping through the video frame by frame. ==========
20-06-2019

Reported with macOs 10.14.5 and JDK versions, 8u to 14 ea build, with AquaLookAndFeel JComboBox dropdown briefly shows previous JComboBox contents. Checked this for reported versions in macOS 10.13.6, but couldn't confirm the issue. With each iteration, opening a JComboBox always display contents of that specific list, without any rendering artifacts. However, this still need to checked with reported macOS version 10.14.5. Writing back to the submitter requesting additional information.
20-06-2019