09-26-2011 03:10 AM
Hello All,
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.
Thanking you,
Regards,
S.A.Norton Stanley
Solved! Go to Solution.
09-26-2011 03:25 AM
09-27-2011 05:38 AM
Hi Simon,
Thank you. Ill try the same.
Regards,
S.A.Norton Stanley
09-27-2011 06:08 AM
Hello,
In my drawListRow method in order to achieve two lines i do the following:
StringBuffer stringBuffer=new StringBuffer();
stringBuffer.append(firstLine).append('\n').append
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?
Thanking you,
Regards,
S.A.Norton Stanley
09-27-2011 06:14 AM
09-27-2011 07:03 AM - edited 09-27-2011 07:12 AM
Hi,
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.
Regards,
S.A.Norton Stanley