Call Java method from Event Dispatch Thread (EDT)


  • javaMethodEDT(MethodName,JavaObj,x1,...,xN)
  • javaMethodEDT(StaticMethodName,ClassName,x1,...,xN)



javaMethodEDT(MethodName,JavaObj,x1,...,xN) calls the method in the class of the Java® object array with the signature matching the arguments x1,...,xN from the Event Dispatch Thread (EDT)

javaMethodEDT(StaticMethodName,ClassName,x1,...,xN) calls the static method in class ClassName.


collapse all

Call Method from EDT

Create a java.util.Vector object, v, and add a string element.

v = java.util.Vector;

Input Arguments

collapse all

MethodName — Name of nonstatic Java methodstring

Name of nonstatic Java method, specified as a string.

Data Types: char

JavaObj — ArrayJava object

Array, specified as a Java object of the class containing the method.

x1,...,xN — Java method input argumentsany type

Java method input arguments, 1 through N (if any), required by MethodName or StaticMethodName, specified by any type. The argument type is specified by the method argument list.

StaticMethodName — Name of static Java methodstring

Name of static Java method, specified as a string.

Data Types: char

ClassName — Name of Java classstring

Name of Java class, specified as a string, containing StaticMethodName.

Data Types: char

More About

expand all


The EDT is the Event Dispatch Thread, used in Java.

Introduced in R2009a

Was this topic helpful?