WebLabel

General

A WebLabel is a component for placing text in a container. The text can be changed by the application, but a user cannot edit it directly..

Example

Below fou find an example of how to use a WebLabel. You can try this example online: http://www.innoopract.com/w4content/

Properties of the WebLabel Component can be easily set in the Property-Editor of the W4T Eclipse Perspective. This example shows how to influence the WebLabel programmatically, e.g. set the visibilty of the WebLabel or how to set its value. The code is located in the in the event handler section and executed when buttons, checkboxes or selectboxes are clicked.

The example WebLabel is named wlbExample.

  private void doWcbVisibleControlWebItemStateChanged( WebEvent e ) throws Exception {
    WebCheckBox wcb = ( WebCheckBox )e.getSource();
    boolean visibility = wcb.isSelected();
    wlbExample.setVisible( visibility );
  }
  
  private void doWbtValueControlWebActionPerformed( WebEvent e ) throws Exception {
    String value = wtxValueControl.getValue();
    wlbExample.setValue( value );
  }
  

API documentation

The API documentation for WebLabel can be found here.