Hi Sergio,
What you could do is this:
-Create a blank image
-Create an instance of that image's Graphics class (using getGraphics() method) and write the text on it using the drawString(...) method
-Show that image using the drawRegion(...) method, specifying the rotation parameter as, for example, Sprite.TRANS_ROT90
Here's the code I used for the canvas. You can adapt it to suit your needs.
Code:
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.Sprite;
public class MyCanvas extends Canvas {
public void paint(Graphics g) {
String s="java";
Image img=Image.createImage(50,50);
Graphics gr=img.getGraphics();
gr.drawString(s, 0, 0, Graphics.TOP|Graphics.LEFT);
g.drawRegion(img, 0, 0, 50, 50, Sprite.TRANS_ROT90, 0, 0, Graphics.TOP|Graphics.LEFT);
}
}