| Contents | Index |
jObj = javaObjectEDT(ClassName,x1,...,xn)
jObj = javaObjectEDT(ClassName,x1,...,xn) invokes the Java constructor for class ClassName with the signature matching the arguments x1,...,xn from the EDT and returns a Java object array.
Static methods on the specified class or Java object run on the MATLAB thread unless invoked using the javaMethodEDT function.
ClassName |
Java class name. |
x1,...,xn |
Optional input arguments for class constructor. If none, MATLAB calls the no-argument constructor. |
jObj |
Java object array. MATLAB invokes subsequent methods on this object from the EDT. |
Construct and return a javax.swing.JFrame object array from the EDT.
f = javaObjectEDT('javax.swing.JFrame', 'New Title')Create a JOption pane on the EDT and call the createDialog method.
% Create a JOption pane on the EDT
optPane = javaObjectEDT('javax.swing.JOptionPane');
% Call the createDialog method - automatically done on the EDT
dlg = optPane.createDialog([],'Sample Dialog');
% Tell MATLAB to dispatch methods on dlg from the EDT
javaObjectEDT(dlg);
import | isjava | javaMethodEDT | javaObject | methods

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |