public void setAlignment(BitmapFont.Align align) {
        if (block.getTextBox() == null && align != Align.Left) {
            throw new RuntimeException("Bound is not set");
        }
        block.setAlignment(align);
        letters.invalidate();
        needRefresh = true;
    }
Set horizontal alignment. Applicable only when text bound is set.

@param align the desired alignment (such as Align.Left)
jme3-core/src/main/java/com/jme3/font/BitmapText.java