SpringGUI

introduction    download    reference    examples    faq


Reference

Name

getElementType()

Examples

// Checks whether the element named "myButton" is a Button and changes its text if it is.
if ( gui.getElementType("myButton").equals("Button") ) {
  gui.setText("myButton", "I am really a button!");
}

Description

Returns the type of an element given by name, as String.

Syntax

String type = gui.getElementType(name);

Parameters

String name The name of the element to query.

Returns

The type of the element as a String. Please note that you have to compare this type by using String's equals(String2), as in
if (type.equals("Button")) { /* do something */ }


back to the top of the page


tinkering with codetools and docsscrapbookabout