3

I am working on a small J2ME project and i need to wrap text displayed on a form as it extends beyond view.

I am using the Nokia IDE

This is my code below:

aboutScreen.append(new StringItem("QY is a simplified web application that enables people all over the world access...", null));

How do I do so that when it gets to the end of the screen it moves to the next line?

gnat
  • 6,213
  • 108
  • 53
  • 73
Ogugua Belonwu
  • 2,111
  • 6
  • 28
  • 45

1 Answers1

2

I think you are using the API incorrectly - the 1st parameter is the label, and not the actual text.

Try new StringItem(null, "QY is a simplified web application that enables people all over the world access...") instead - and the text should auto-wrap when the space for it runs out.

You can read about it in the JavaDoc - check the Item Sizes section: http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/lcdui/Item.html#sizes

RonK
  • 9,472
  • 8
  • 51
  • 87