09-26-2011 03:10 AM
I am currently porting an existing Jme application to BB using the native api(JDE 4.6).I currently have a list which is rendered as shown in the attached image . Could someone kindly guide me as to how i achieve the same using the List field or the possible way of acheiving the same. Thanks in advance.
Solved! Go to Solution.
09-26-2011 03:25 AM
09-27-2011 06:08 AM
In my drawListRow method in order to achieve two lines i do the following:
StringBuffer stringBuffer=new StringBuffer();
g.drawText(stringBuffer.toString(),width, y, 0, w);
but i never see a new line being added.The first line and second line appear together. Am i doing something wrong here?
09-27-2011 06:14 AM
09-27-2011 07:03 AM - edited 09-27-2011 07:12 AM
Thank you. I achieved it using the following :
g.drawText(firstLine,width, y, 0, w);
g.drawText(secondLine, y+g.getFont().getHeight(), 0, w);
And also to point out the drawText method does not handle new-lines, which i figured out later.