I'm newer here.
I very often get java error when using MATLAB. I am using an Intel Mac and the MATLAB version is R2012a.
The error is displayed in the MATLAB command window as follows:
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1971) at java.awt.Component.getLocationOnScreen(Component.java:1945) at apple.awt.CAccessibility$22.call(CAccessibility.java:370) at apple.awt.CAccessibility$22.call(CAccessibility.java:368) at apple.awt.CToolkit$CallableWrapper.run(CToolkit.java:1121) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at apple.awt.CToolkit$CPeerEvent.dispatch(CToolkit.java:1211) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:663) at java.awt.EventQueue$2.run(EventQueue.java:661) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:672) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
As I know, this error only happens when I do something with the mouse.
eg.
When I right-click the MATLAB function in the current folder, click Open. I will get an 80% chance of getting this error. But if you just enter edit xxx.m in the command window. then I will never get this error.
When I drag a variable from Workspace to the Variable Editor, I have an 80% chance of getting this error. And I do not consider a variable in the Variable Editor with the command.
And, if this error occurred, it will happen all the time until you turn off your MATLAB and restart it if you do something with the mouse. for example, add the path to the MATLAB search path with the mouse, change the directory with the mouse. If you open it again, you will again get an 80% chance of getting this problem when using the mouse.
Has anyone else seen such problems? I don't know anything about java. Can someone give me some suggestion. Thanks.
source share