JDK-8156188 : JComboBox content interferes with mouse wheel scrolling
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8u60,9
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-05-05
  • Updated: 2016-05-11
  • Resolved: 2016-05-11
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 9
9Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Darwin rberlin-mbp15.guidewire.com 13.4.0 Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST 2016; root:xnu-2422.115.15~1/RELEASE_X86_64 x86_64

A DESCRIPTION OF THE PROBLEM :
If you are pointing at content inside a JScrollPane, and the mouse pointer is on a ComboBox, mouse scroll wheel does not respond.  Likely this is a side-effect of the fix for http://bugs.java.com/view_bug.do?bug_id=8033069

REGRESSION.  Last worked in version 8u73

ADDITIONAL REGRESSION INFORMATION: 
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the following program.   Try mouse wheel scrolling with the mouse pointer in various places: over the scrollbar, over the combo boxes, over the labels.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Scroll wheel should work no matter what portion of the scrolled content the mouse pointer is over.
ACTUAL -
Scroll wheel does not respond when the mouse pointer is over the combo boxes.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
package com.guidewire;

import javax.swing.*;
import java.awt.*;

public class ScrollWithComboBox extends JFrame {
    public ScrollWithComboBox() {
        super("Scroll with ComboBox");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JPanel panel = new JPanel(new GridLayout(20, 2));

        for (int i = 1; i <= 20; ++i) {
            panel.add(new JLabel("Row " +i+ ":"));
            JComboBox comboBox = new JComboBox<String>(new String[]{"a", "b", "c"});
            panel.add(comboBox);
        }

        JScrollPane pane = new JScrollPane(panel);
        this.setContentPane(pane);
        this.setSize(256, 256);
    }

    public static void main(String[] args) {
        new ScrollWithComboBox().setVisible(true);
    }
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Using an older version of the JDK is the only thing that works.

Note that the actual bug is showing up in our IntelliJ plugin.  This will affect a large number of developers.



Comments
I'm assigning the issue to myself as I already have the fix to JDK-8136998 which is the exact duplicate of this bug.
10-05-2016

This bug is not OS X specific, so I removed 'macosx' prefix and label.
10-05-2016