Results 1 to 7 of 7
Thread: Web Browser
- 04-18-2010, 10:48 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 70
- Rep Power
- 0
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.
- 04-19-2010, 04:41 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you want to display HTML content in a Java application, use JEditorPane.
- 04-20-2010, 04:46 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 70
- Rep Power
- 0
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?
- 04-20-2010, 04:49 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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?
- 04-20-2010, 05:25 AM #5
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
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?
- 04-20-2010, 04:26 PM #6
Member
- Join Date
- Mar 2009
- Posts
- 70
- Rep Power
- 0
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.
- 04-20-2010, 06:59 PM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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
-
GUI in browser
By trust in forum AWT / SwingReplies: 1Last Post: 07-28-2009, 01:29 PM -
SWT browser help
By MarkWilson in forum SWT / JFaceReplies: 1Last Post: 04-07-2009, 10:56 AM -
Browser
By Jessie Madman in forum AWT / SwingReplies: 20Last Post: 02-17-2009, 01:56 PM -
Need Help! swt/Browser
By sealyu in forum SWT / JFaceReplies: 4Last Post: 07-09-2008, 08:16 PM -
how to get url from browser
By srinivas reddy in forum New To JavaReplies: 0Last Post: 02-08-2008, 07:46 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks