showInputDialog( ) focus

I have an application in which the user drags an object onto a canvas. When the drop occurs the drop target (canvas) executes the statement: data = JOptionPane.showInputDialog(...). The cursor is blinking in the dialog's text field, but the user has to click on the field (or the dialog window) before input is accepted. Is there a way to automatically set focus for the dialog so the user doesn't have to click it first? I don't see how to use requestFocus() on a modal dialog. Thanks for our help.