You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.

Interface HasLabel

    • Method Summary

      All Methods
      Modifier and Type Method Description
      default String getLabel()

      Gets the label of the component.

      default void setLabel​(String label)

      Set the label of the component to the given text.

    • Method Detail

      • setLabel

        default void setLabel​(String label)

        Set the label of the component to the given text.

        Parameters:

        label - the label text to set or null to clear

      • getLabel

        default String getLabel()

        Gets the label of the component.

        Returns:

        the label of the component or null if no label has been set