public void setTargetHeight (int targetHeight)
    {
        if (targetHeight <= 0) {
            throw new IllegalArgumentException(
                "Invalid target height '" + targetHeight + "'");
        }
        _constraints.width = 0;
        _constraints.height = targetHeight;
        invalidate("setTargetHeight");
    }
public void setTargetHeight ( int targetHeight ) { if ( targetHeight <= 0 ) { throw new IllegalArgumentException ( "Invalid target height '" + targetHeight + "'" ) ; } _constraints . width = 0 ; _constraints . height = targetHeight ; invalidate ( "setTargetHeight" ) ; }
Sets the target height for this label. A simple algorithm will be used to balance the width
of the text in order that there are only as many lines of text as fit into the target
height. If rendering the label as a single line of text causes it to be taller than the
target height, we simply render ourselves anyway. Calling this method will annul any
previously established target width as we must have one degree of freedom in which to
maneuver.

<p> This should be followed by a call to {@link #layout} before a call is made to {@link
#render} as this method invalidates the layout information.