sceptre

Opening new dialog when custom tool is enabled freezes ArcMap

Discussion created by sceptre on Apr 10, 2012
I am using java arcobjects 10.  I have a class that extends Tool, which shows up as a button in a toolbar.  I click the button to enable the custom tool.  I then click anything that opens a custom dialog (using a JFrame).  If I click a button on the dialog while the mouse pointer is on top of the map, ArcMap hangs.  That is, I position the dialog so that when I click the Cancel button to close the custom dialog, the mouse pointer would click a point on the map window if the dialog wasn't there.  If I drag the custom dialog so that the click happens over the menu bar or layer list then ArcMap does not freeze.  If I first click an ESRI tool so that the custom tool is no longer enabled then ArcMap does not freeze.  This behavior is repeatable every time, and it even happens when the custom tool has no code in it.  All that is necessary is that the custom tool is clicked and the custom dialog has at least one button to click. 

Has anyone else had this problem?  It is very easily repeatable with a class that extends Tool and a class that extends JFrame.  I would appreciate any help with this.

Thanks.

Outcomes