ObjectListField
isn't really the right way to do this - it's really designed as a quick version of ListField
for those times when you just need a simple list of strings.
You should extend ListField
itself, and provide your own implementation of ListFieldCallback
that renders your list based on your data model. Use ListField.setCallback
to set your callback.
ListFieldCallback.drawListRow
gives you a Graphics
context, so you can draw whatever you want, including multiple lines of text. Also make sure to call ListField.setRowHeight
on your listfield to make the rows high enough for 2 lines of text (the default height is the font height, so you'd only have room for 1 line of text).
Sample code is something like (this is not complete and will not compile without some other code):
ListField myListField = new ListField();
myListField.setRowHeight(getFont().getHeight() * 2)
myListField.setCallback(new ListFieldCallback() {
public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width) {
// draw the first line of text
graphics.drawText(0, y, "ROW " + rowNumber);
graphics.drawText(20, y, "ROW NAME");
graphics.drawText(20, y + getFont().getHeight(), "row details");
}