Convert an BitMapFont or BitmapText to an Texture or Picture?

I have a class that show a picture in screen and do some effects, it accept an Texture as input.
I want to extend this class somehow in order to show text also.
The problem is I could not find a way to convert an BitMapFont to Texture or Picture or whatever.
There is any easy to do it ?

Maybe someone else has a better solution, but maybe you could render the BitmapText to a texture using similar code to what is in this post

http://hub.jmonkeyengine.org/t/framebuffer-and-bitmaptext/30813/5

edit: but make sure you look at what he did to fix that code, think that wasn’t worked as desired

There is no direct way since a bitmap text is just a mesh like anything else… just with a special texture.

So your choices are either:

  1. render to texture (see the render to texture examples… which may be what @JESTERRRRRR is referring to)
  2. render it in a different way (say using Java2D and a BufferedImage) and then convert it to a texture.