×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    20

    Lightbulb LWUIT HTML Component

    Hi,
    I was developing a J2ME application , i want to show a web page inside a mobile phone application, but not call a browser.
    i was done , but currently i facing the address problem
    i only can run "http://m.google.com"
    but i want to run "http://www.google.com"


    this is the code that i launch a web inside mobile phone

    Display.init(this);

    HttpRequestHandler handler=new HttpRequestHandler();

    HTMLComponent htmlC = new HTMLComponent(handler);

    Form f = new Form();

    f.setTitle("MyTitle");

    f.setLayout(new GridLayout(1,1));

    f.addComponent(htmlC);

    f.show();

    htmlC.setPage("http://www.google.com");


    after i run it, i can saw my application that show a title "MyTile" but the content are show blank.

    what might be the problem?



    thank you

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: LWUIT HTML Component

    That's because www.google.com doesn't comply with the XHTML-Mobile Profile Standard.

    According to this link:
    http://download.oracle.com/javame/de.../bbjidhgf.html
    LWUIT's HTMLComponent renders HTML documents that conform to the XHTML Mobile Profile 1.0 (XHTML-MP 1.0) standard

    XHTML-MP 1.0 is a subset of XHTML adapted for mobile. The standard supports most of the basic elements such as Images, Fonts, Lists, Tables, Forms, and even WCSS (a subset of CSS2 for wireless). It does not support Javascript or frames, and it does not support all CSS2 tags or attributes.
    Using HTMLComponent can help you browse a very limited number of pages.

    You might want to use eSWT for what you are trying to do. It provides a Browser widget. A full example can be found here:

    http://www.developer.nokia.com/Commu...ser_in_Java_ME

    Additional information about eSWT browser widget:

    http://library.developer.nokia.com/i...81951691D.html

    http://library.developer.nokia.com/i...e-summary.html

    Please note that you can only use eSWT with Symbian devices, not Series 40.

  3. #3
    Registered User
    Join Date
    Aug 2011
    Posts
    20

    Thumbs up Re: LWUIT HTML Component

    thanks a lot..
    i resorted to using PlatformRequest() to launch a browser because the eSWT and HTML component have major constraints as to what i'd like to do.
    thanks

Similar Threads

  1. LWUIT Place one component on another
    By vijay.ketha in forum Mobile Java General
    Replies: 0
    Last Post: 2011-04-20, 14:06
  2. HTML Component
    By senthil_25 in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2010-08-25, 11:14
  3. HTML Component
    By senthil_25 in forum Mobile Java General
    Replies: 0
    Last Post: 2010-08-19, 11:33
  4. LWUIT Calendar Component
    By neeraja.nokia in forum Mobile Java General
    Replies: 2
    Last Post: 2008-12-15, 06:12
  5. set the size for a component of LWUIT
    By neeraja.nokia in forum Mobile Java General
    Replies: 1
    Last Post: 2008-11-01, 02:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •