I tried to write this piece of code but it is showing error saying it cannot find TextBounds. But it works fine with when I use only BitmapFont.
package com.gamefromscratch;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
public class TextDemo extends ApplicationAdapter
{
SpriteBatch batch;
BitmapFont font;
BitmapFont.TextBounds bounds;
String mytext;
}
I am using Netbeans 8.2