Here is exactly what I do, please let me know what mistake I am making. 1- start new visual project (old gui builder) 2- create PostMain() with the following code:
@Override protected void postMain(Form f) { Form myform = new Form("HTML TEST"); myform.setLayout(new BorderLayout()); String html ="<HTML><BODY>"; String browserBaseUrl = FileSystemStorage.getInstance().getAppHomePath(); try { InputStream in = FileSystemStorage.getInstance().openInputStream(FileSystemStorage.getInstance().getAppHomePath()+"/hello.html"); html += Util.readToString(in); } catch(Exception e) { System.out.println("problem: "+e.getMessage()); } html+="</BODY></HTML>"; BrowserComponent browser = new BrowserComponent(); myform.add(BorderLayout.CENTER, browser); browser.setPage(html,browserBaseUrl); System.out.println("base url: "+browserBaseUrl); System.out.println("base url: "+html); myform.show(); } 3- place the following html in a file called "hello.html" in C:\Users\Gaz\.cn1 <FONT SIZE=15>HELLO, AN IMAGE SHOULD LOAD BELOW ME<br></FONT> <IMG SRC="image.png" width=100 height=100> Put any image in same dir and call it image.png. Run in simulator, image does not appear, but text does. Note that dbl clicking hello.html in windows will load browser and image will show. I've been going in circles for days with this and it looks perfectly correct to me. Thanks! On Friday, January 11, 2019 at 7:31:38 AM UTC+8, Gareth Murfin wrote: > > can you send me the example code? still cannot get it working no matter > what I try :( > > On Thursday, January 10, 2019 at 11:41:48 AM UTC+8, Shai Almog wrote: >> >> Yes I tried HTML navigation with ascii characters. >> > -- 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-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/96082857-ccbe-4c5e-bd59-6fcc1311a444%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.