Proxy

class pyjt.Proxy(obj)

Bases: object

Proxy calls to the java.awt and javax.swing libraries using the event thread to ensure thread-safety.

This class is usually automatically instanciated and returned by the locate() and find() functions of pyjt.

If the proxy detects that the return value of the call is a instance of java.awt.Component, a new proxy instance for this object is created and returned.

Parameters:

obj (java.awt.Component) – The component to control with this Proxy.

Example:

proxy = Proxy(java.swing.JLabel())
text = proxy.getText()
isinstance(classtype)

Check if the object managed by this class is an instance of classtype.

Parameters:

classtype (Class) – The class type.

Returns:

True, if the object managed by this proxy is a instance of class classtype

Return type:

boolean

property object

Returns: java.awt.Component: The control object managed by this proxy.