Documentation Center

  • Trial Software
  • Product Updates

javaMethodEDT

Call Java method from Event Dispatch Thread (EDT)

Syntax

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

Description

example

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.

Examples

expand all

Call Method from EDT

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

v = java.util.Vector;
javaMethodEDT('add',v,'string');

Input Arguments

expand 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

EDT

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

See Also

| | | |

Was this topic helpful?