laptop and a wrench

Bug

MapControl stops listening to the keyboard events if you minimize the window, or click on another application and then click back on the map in JAVA.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM005083
SubmittedNovember 2, 2006
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.1
Program languageJava
Version Fixed9.3
StatusDuplicate

Additional Information

NIM008211

Workaround

1) include a call to map.requestFocusInWindow() in the "onMouseUp" event of the mapcontrolAND2) add key listeners to the map control to listen to the AWT key events: map.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent theEvent) { System.out.println("keyPressed"); } public void keyReleased(java.awt.event.KeyEvent parm1) { System.out.println("keyReleased"); } });To test the workaround in the project 528704, enable the two pices of code enclosed between the comments "// ENABLE THESE LINES TO SOLVE ISSUE " in the file MapEventTest.java. The workaround works fine in 9.1 and 9.2

Steps to Reproduce

Bug ID: NIM005083

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options