Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

collapse all

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

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

Input Arguments

collapse all

Name of a nonstatic Java method, specified as a character vector.

Data Types: char

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

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.

Name of a static Java method, specified as a character vector.

Data Types: char

Name of a Java class, specified as a character vector, containing StaticMethodName.

Data Types: char

More About

collapse all

EDT

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

Introduced in R2009a

Was this topic helpful?