【发布时间】:2013-07-23 23:51:55
【问题描述】:
我需要在 j2me 模拟器中打开一个网页。因为我有可以通过使用 HTMLComponent 来做到这一点的流程。但是我不能使用这个 HttpRequestHandler 类在 Lwiit 的 j2me 中创建处理程序,谁能告诉我我的 j2me 中缺少什么?如果有任何 JAR 文件可以使用它,那么请给我使用它的建议。然后我也尝试过 DocumentRequestHandler 而不是 HttpRequestHandler 但它向我展示了“连接流中的错误”
我的代码是:
DocumentRequestHandler handler=new DocumentRequestHandler() {
public InputStream resourceRequested(DocumentInfo di) {
return null;
// throw new UnsupportedOperationException("Not supported yet.");
}
};
HTMLComponent htmlc=new HTMLComponent(handler);
htmlc.setPage("http://facebook.com");
addComponent(htmlc);
show();
在这段代码中,我需要在 DocumentRequestHandler 中返回什么?
【问题讨论】:
标签: java-me lwuit html-components