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 176395

Summary: Editor Loses Keyboard Focus And Cannot Regain It
Product: editor Reporter: paudano <paudano>
Component: -- Other --Assignee: issues@editor <issues>
Status: RESOLVED DUPLICATE    
Severity: normal Keywords: FOCUS
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description paudano 2009-11-10 06:31:28 UTC
While using Netbeans with multiple GUI Windows (Usually with the "Project" and "Navigator" views in a separate window), the code editor section will lose keyboard focus and I cannot regain it without resetting my views. Normally, the solution is put the Navigator and Project views back into the main window and bring them out again.

To reproduce on my system, I separate Projects. Then, I will open multiple Java files from a project. I can also reproduce by continuously closing and opening the same file. Eventually, the separated Projects view will retain keyboard focus and there is nothing I can do to give the editor focus. As soon as I put it back into the main window, the editor can get focus again.

Once I have reproduced the issue, I can tear out another view, and that view can gain keyboard focus. For example, I put Navigator in it's own window; the up/down keys worked in Navigator. The keys will not work in the Editor no matter which order I switch among Navigator, Projects, and the editor in this configuration. As soon as I put one of the windows back in the main Window, I can edit files again.

This issue occurs randomly and may be related to some timing or race condition. I am using Netbeans on an older PC (Dell Gx270) with 2GB of RAM. It seems that this occurs more frequently when there is a pause while opening a file from Projects. I suspect this will be more difficult to reproduce on a faster machine.

I tailed var/log/messages.log while I reproduced the error and nothing showed up.

Linux: Gentoo Linux, updates installed.
Java: Currently running 6, but I saw the same behavior with 5.
Netbeans: 6.7.1. I have had this issue for several versions (at least 6.5.1, 6.1, and probably 5.0).

Since I have dual monitors (Nvidia Twinview - applications see only one desktop), it really helps to place certain views (Like Navigator and Projects) in another window on the other screen to maximize the amount of space I have for coding and GUI layout.
Comment 1 Vitezslav Stejskal 2010-02-18 09:00:24 UTC

*** This bug has been marked as a duplicate of bug 119617 ***