When Netbeans is in the background and you click in the window to bring it to the foreground, the application should ignore that click. At least on Macs, this is standard behavior for all applications, and users expect all programs to work that way. They do not pay attention to where they click in the window, or make any effort to avoid clicking on, for example, a button or close box. But Netbeans does interpret the click, and the results can be very frustrating.
Even when I remember to be careful, this behavior is just irritating. I find myself having to think carefully to pick a spot where I can safely click without moving the insertion point.
Please provide JDK, OS and NetBeans version info and reopen, thanks.
This has been present in every NetBeans version and every OS version for as long as I've been using it. Here are the details from the "About NetBeans" window for my current configuration:
Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.6.0_45; Java HotSpot(TM) 64-Bit Server VM 20.45-b01-451
Runtime: Java(TM) SE Runtime Environment 1.6.0_45-b06-451-11M4406
System: Mac OS X version 10.8.3 running on x86_64; MacRoman; en_US (nb)
Thanks for the info.
Can you reproduce the problem with some other plain Swing application? E.g. some demo application from NetBeans sample projects?
It's a problem in JDK implementation as it is reproducible in a plain Swing app (Anagrams demo in NetBeans)
I tried clicking into Safari toolbar when other application was in foreground and that click activated the Safari window AND the toolbar button was pressed.
Mac OS X 10.8.4
Apple has specific guidelines about this. See http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html, specifically the section on "Enabling Click-Through". The normal behavior in Mac applications is that clicks to background windows are not processed. Exceptions are supposed to be made only when there's a good reason. The current behavior in Netbeans violates several of their guidelines. For example, it allows click through to remove the user from the current context (such as by changing tabs), and it doesn't provide confirmation feedback for much of anything.
More importantly, this is just a bad way for the user interface to work. It produces irritating, unwanted effects.
Reported as JDK bug.