I create an input dialog box with the following code:
prompt={'Enter the matrix size for x^2:','Enter the colormap name:'};name='Input for Peaks function';numlines=1;defaultanswer={'20','hsv'};answer=inputdlg(prompt,name,numlines,defaultanswer)
When I click on the canel button I receive the following error:
java.lang.NullPointerException at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source) at sun.awt.im.InputContext.dispatchEvent(Unknown Source) at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Best Answer