Results 1 to 7 of 7

Thread: Web Browser

  1. #1
    rp181 is offline Member
    Join Date
    Mar 2009
    Posts
    70
    Rep Power
    0

    Default Web Browser

    How can i embed a webpage in a java application? The site is java script (Wikimapia - Let's describe the whole world!)

    I tried searching, but can't find anything. When trying to use Lobo's API, i get a no clientlet found error. I am on 64bit linux, using netbeans.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  3. #3
    rp181 is offline Member
    Join Date
    Mar 2009
    Posts
    70
    Rep Power
    0

    Default

    It is not purely HTML, but something else (not quite sure, think javascript). It is an interactive map, visit Wikimapia - Let's describe the whole world! too see.

    The JEditorPane would just strip out the text, right? There is no text on the page at all, and i need to basically have what's in the browser in the java program.

    I was look at things at mozswing, JDIC, but all seem incomplete, and/or lack 64bit support.

    If i were to use an applet, is there a way to tell the browser what url to show in a frame? For example, if the code was

    <iframe src="http://wikimapia.org/#lat=39.1598818&lon=-106.0702515&z=10&l=0&ifr=1&m=b" width="250" height="250" frameborder="0"></iframe>

    could i change it to

    <iframe src="http://wikimapia.org/#lat=74&lon=-301&z=10&l=0&ifr=1&m=b" width="250" height="250" frameborder="0"></iframe>

    from within an applet? If not, how about through java script?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    In the JEdiotorPane you can embedded a web page. Able to added Google site there and navigate basically, in simple words. Did you try anything on that, did you read the Java DOC about that?

  5. #5
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    JEditorPane is the only thing I'm aware of in the standard API that gives you a headstart on building whatever browser interaction you want. But, it has severe limitations. It basically only supports HTML, images, and simple sound files out of the box. If you want javascript support, flash, streaming content, silverlight, etc., then JEditorPane is not going to do that. Why not just launch the default browser for that sort of thing?

  6. #6
    rp181 is offline Member
    Join Date
    Mar 2009
    Posts
    70
    Rep Power
    0

    Default

    I tried the JEditorPane. That doesn't support that website. I just get a big blue block, and a bunch of "noscript" tags. It strips out whatever it can render, which is basically nothing on this website.

    I would be fine with launching the system's browser, but i need to be able to manipulate the URL. Wikimapia has the longitude and latitude in it's URL, and i need to be able to change those values, and reload the page.

    Is it posible to tell a running browser session to do this? I read somewhere that it may be possible, because browsers detect if a session is already running, and if so, tells it to load a page in a new tab.

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    As toadaly says, loading scripts on JEditorPane is problematic. I think the best option is start the default browser with the relevant URL you want to execute.

Similar Threads

  1. GUI in browser
    By trust in forum AWT / Swing
    Replies: 1
    Last Post: 07-28-2009, 02:29 PM
  2. SWT browser help
    By MarkWilson in forum SWT / JFace
    Replies: 1
    Last Post: 04-07-2009, 11:56 AM
  3. Browser
    By Jessie Madman in forum AWT / Swing
    Replies: 20
    Last Post: 02-17-2009, 02:56 PM
  4. Need Help! swt/Browser
    By sealyu in forum SWT / JFace
    Replies: 4
    Last Post: 07-09-2008, 09:16 PM
  5. how to get url from browser
    By srinivas reddy in forum New To Java
    Replies: 0
    Last Post: 02-08-2008, 08:46 AM

Posting Permissions

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