Can I display a website like wikipedia, google or etc. in my Java applet? I am looking for something like WebBrowser component in C#. Does anyone know how to achieve this?
Asked
Active
Viewed 2,113 times
1
-
1) Unless you can supply the pages via a proxy at your own site, an applet would need to be digitally signed by you & trusted by the end user in order to load a web page. 2) Java (J2SE) is horrid at rendering real world (wild web) HTML. It only supports version 3.2 and simple styling, and then only poorly. 3) Why on earth would I (as a potential end user), want to view pages that are a) easily bookmarkable b) easily zoomable c) remember followed links .. in ..your applet, which would do none of those things? 4) Many of those types of sites both prohibit 'reuse' and take measures against it. – Andrew Thompson Feb 21 '12 at 18:39
3 Answers
0
There are several browser components, and you can see Best Java/Swing browser component? here on SO for some discussion on the "best".
A thought aside - since an applet is already in a web browser, it might be better to bridge to get the browser to display the website you want in, say, an <iframe>
, rather than load a browser into a browser.
0
Swing supports basic HTML (I think version 2.0 or so). So, you can try to use it. Also there are a several good pure java fully functional HTML browsers. The question is: why? Java applet runs into browser that knows to show HTML pages. You can easily cause applet to show HTML page into the native browser where it is running now.