String text = "";
try { InputStream in = FileSystemStorage.getInstance().openInputStream(CHAPTER_DIRECTORY+"/"+title); if (in != null){ text = com.codename1.io.Util.readToString(in); in.close(); }} catch (IOException ex) { System.out.println(ex); text = "Read Error"; html = new HTMLElement("html"); html.setText("READ ERROR");}
Form f = new Form(title);f.setLayout(new BorderLayout()); HTMLComponent hc = new HTMLComponent();hc.setBodyText(text); f.addComponent(BorderLayout.CENTER,hc); f.show();
WebBrowser wb = new WebBrowser();wb.setScrollable(true);wb.setURL("http://"+CHAPTER_DIRECTORY+"/"+title);
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/ffb50c12-1174-47f6-87e1-b260de7a4dec%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.