Why are MATLAB figure windows accessible, but cause MATLAB to hang when I create modal Java dialogs in MATLAB 6.5 (R13)?
1 view (last 30 days)
Show older comments
Why are MATLAB figure windows accessible, but cause MATLAB to hang when I create modal Java dialogs in MATLAB 6.5 (R13)?
I have the following code that creates a MATLAB figure and a Java modal dialog box:
dialog = javax.swing.JDialog(javax.swing.JFrame, logical(1))
figure
dialog.setVisible(logical(1))
With the Java modal dialog open, I am unable to access the MATLAB Desktop, as is expected. However, I am still able to click on any open figure windows. Once I do this, MATLAB freezes and I need to manually kill the process.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
This is a bug in MATLAB 6.5 (R13) that has been reported to our development staff for further investigation.
One possible workaround is to set the visibility all MATLAB figure windows to 'OFF' before setting your Java modal dialog to be visible:
set(findall(0, 'type', 'figure'), 'visible', 'off')
After the Java dialog has closed, you can set all figures to be visible again:
set(findall(0, 'type', 'figure'), 'visible', 'on')
0 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!