列出j2me的所有记录
我想列出唱片店中的所有记录。我已经声明了一个列表:
Private List tlist = new List("Select One", List.IMPLICIT);
还枚举了记录:
Form mainf;
Command exit = new Command("Exit", Command.EXIT, 0);
RecordEnumeration re = null;
int numrecords = 0;
try {
re = contactList.enumerateRecords(null, null, false);
numrecords = re.numRecords();
} catch (RecordStoreException rse ) { numrecords = 0;}
现在我只需要知道如何列出列表中的所有记录。
I want to list all records in the record store. I've declared a list:
Private List tlist = new List("Select One", List.IMPLICIT);
Also enumerated the records:
Form mainf;
Command exit = new Command("Exit", Command.EXIT, 0);
RecordEnumeration re = null;
int numrecords = 0;
try {
re = contactList.enumerateRecords(null, null, false);
numrecords = re.numRecords();
} catch (RecordStoreException rse ) { numrecords = 0;}
Now I just need to know how to list all the records in a list.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将
Record
添加到Vector
中,并使用循环将Vector
值附加到List
中。请参阅下面的示例代码,Add the
Record
intoVector
and use the loop for append theVector
values intoList
. See below sample code,您可以使用以下代码,
you can use following code,