This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 239241 - JComboBox consumes key events in JDK8
Summary: JComboBox consumes key events in JDK8
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
: 239850 244062 249136 252585 254661 257177 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-08 14:52 UTC by ionuion
Modified: 2015-12-18 12:45 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Simple Java project that (probably) demonstrates a bug in JDK8 (14.68 KB, application/zip)
2014-01-10 08:47 UTC, Jaroslav Havlin
Details
The main (and only) class from the project (2.41 KB, text/plain)
2014-01-10 08:49 UTC, Jaroslav Havlin
Details
Possible Workaround (draft) (6.39 KB, patch)
2014-01-10 17:08 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ionuion 2013-12-08 14:52:49 UTC
Environment:
Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b59
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b117
System: Mac OS X version 10.8.5 running on x86_64; UTF-8; en_US (nb)

Steps to reproduce:
1. Open the Find in Projects dialog (Cmd-Shift-F)
2. Fill in anything in the Containing text field. 
3. Press Enter to submit

Expected result
The search is started

Actual result
The only chance to start the search is to use the mouse and click the Find button.

4. Press Esc to close the window

Expected result
The Find in Projects window closes as do all the dialog windows on Esc

Actual result
The only chance to close the window is to use the mouse (OS window close button or the Close button)
Comment 1 Jaroslav Havlin 2013-12-11 15:57:46 UTC
I'm sorry, I cannot reproduce this bug.
Do you use the Default search, Grep search, or another search provider?
Comment 2 ionuion 2013-12-23 15:41:34 UTC
Jaroslav,

I don't know what you mean by default search, grep search. I'm using the Find in Projects dialog in NetBeans IDE, don't know much about the providers beneath the UI.

I'm able to reproduce this in both 7.4 (as stated in the description) and in:
Product Version: NetBeans IDE Dev (Build 201312170002)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b61
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b119
System: Mac OS X version 10.9.1 running on x86_64; UTF-8; en_US (nb)

What's your environment?

(In reply to Jaroslav Havlin from comment #1)
> I'm sorry, I cannot reproduce this bug.
> Do you use the Default search, Grep search, or another search provider?
Comment 3 Jaroslav Havlin 2014-01-08 08:50:23 UTC
(In reply to ionuion from comment #2)
> I don't know what you mean by default search, grep search.
So you are using the default search, Grep search is available only when C/C++ support is activated.

> What's your environment?
We were able to reproduce the bug using JDK8 on Mac.
It works fine on Windows, Linux and Mac with JDK7.
We'll investigate it.

Thank you for your help.
Comment 4 Jaroslav Havlin 2014-01-10 08:47:50 UTC
Created attachment 143771 [details]
Simple Java project that (probably) demonstrates a bug in JDK8

Attaching a simple project that contains one window with a button to open a dialog.
There is a JComboBox and a JTextField in the dialog. If the combo box is focused, the dialog cannot be closed by pressing <ESC>. If the text field is focused, pressing <ESC> closes the dialog as expected.

If the project is run on JDK7, the dialog can be closed by pressing <ESC> regardless of which of the components has focus.

It seems that the JComboBox component in JDK8 consumes key events.
Comment 5 Jaroslav Havlin 2014-01-10 08:49:12 UTC
Created attachment 143772 [details]
The main (and only) class from the project
Comment 6 Jaroslav Havlin 2014-01-10 08:52:45 UTC
*** Bug 239850 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Havlin 2014-01-10 08:59:34 UTC
Reassigning to platform/JDK Problems.
Comment 8 Antonin Nebuzelsky 2014-01-10 13:29:55 UTC
https://bugs.openjdk.java.net/browse/JDK-8031485
Comment 9 Jaroslav Havlin 2014-01-10 17:08:24 UTC
Created attachment 143811 [details]
Possible Workaround (draft)
Comment 10 Jaroslav Havlin 2014-05-30 10:29:31 UTC
*** Bug 244062 has been marked as a duplicate of this bug. ***
Comment 11 Jaroslav Havlin 2014-12-19 15:53:11 UTC
*** Bug 249136 has been marked as a duplicate of this bug. ***
Comment 12 Jaroslav Havlin 2014-12-19 16:01:50 UTC
(In reply to Jaroslav Havlin from comment #11)
> *** Bug 249136 has been marked as a duplicate of this bug. ***
The bug is still partially present (ESC key works correctly, ENTER key is still broken) in JDK 8u25, although it was marked as fixed in 8u20. Reopening.
Comment 13 Antonin Nebuzelsky 2014-12-22 13:40:34 UTC
(In reply to Jaroslav Havlin from comment #12)
> The bug is still partially present (ESC key works correctly, ENTER key is
> still broken) in JDK 8u25, although it was marked as fixed in 8u20.
> Reopening.

Filed a new JDK issue for Enter key:
https://bugs.openjdk.java.net/browse/JDK-8068040
Comment 14 Jaroslav Havlin 2015-08-12 07:55:29 UTC
*** Bug 252585 has been marked as a duplicate of this bug. ***
Comment 15 Jaroslav Havlin 2015-08-25 11:20:28 UTC
*** Bug 254661 has been marked as a duplicate of this bug. ***
Comment 16 Jaroslav Havlin 2015-12-18 12:45:08 UTC
*** Bug 257177 has been marked as a duplicate of this bug. ***