Labels & Image Views

This section introduces two of the least complex but most common Pivot components: Label and ImageView. Labels are used to present a block of static, optionally wrapped, text, and image views are used to display a static graphic. The applet below shows an ImageView followed by a Label:

Below is the BXML source used to generate the applet's contents:

            <Window title="Labels" maximized="true"
                <BoxPane styles="{padding:4, verticalAlignment:'center'}">
                    <ImageView image="/org/apache/pivot/tutorials/clock.png"/>
                    <Label text="What time is it?"/>

Note that the example uses a BoxPane to arrange the components horizontally. The BoxPane container is discussed in more detail in the Layout Containers section.

Next: SVG Images