Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Creating a web browser in Java

Thread view: 
ashish.hearts@gmail.com - 15 Nov 2005 08:03 GMT
I am creating a web browser in Java. In this browser I am using
JEditorPane for Browser Window. I am using "setPage(String url)" method
to display the page. The browser can display the page but there are
some problems which are as mentioned::

1. The browser is not displaying the java script.
2. It is not displaying the Applet.
3. The images are also not displayed.
Andrew Thompson - 15 Nov 2005 08:24 GMT
> I am creating a web browser in Java. In this browser I am using
> JEditorPane for Browser Window. I am using "setPage(String url)" method
[quoted text clipped - 4 lines]
> 2. It is not displaying the Applet.
> 3. The images are also not displayed.

Did you actually have a question, or were you just commenting?

As an aside, you would need to change JEditorPane
(extensively) to support 1., and 2., though 3. is
probably an error in your HTML.  Did you check it
in the validator*, or, like most programmers, just
presume you know how to write HTML correctly?

Note that JEditorPane is not considered robust enough
to use as a general HTML parser/renderer for HTML documents
on the internet, as most of those are invalid, and J.E.P.
does not render invalid HTML (sometimes throwing some
exciting and long stacktraces, wile not rendering the
document, as a bonus!).

* <http://validator.w3.org/>
Thomas Hawtin - 15 Nov 2005 09:19 GMT
> Note that JEditorPane is not considered robust enough
> to use as a general HTML parser/renderer for HTML documents
> on the internet, as most of those are invalid, and J.E.P.
> does not render invalid HTML (sometimes throwing some
> exciting and long stacktraces, wile not rendering the
> document, as a bonus!).

Yup, the Swing HTML implementation only attempts to support a subset of
ye very olde HTML 3.2, and it does that badly.

On the bright side, there is a project to integrate modern browsers as
components.

https://jdic.dev.java.net/

IIRC, it is intended that Java SE 6 will include a version of this when
it is released next year.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

Andrew Thompson - 15 Nov 2005 11:02 GMT
..
>> Note that JEditorPane is not...
..
> On the bright side, there is a project to integrate modern browsers as
> components.
>
> https://jdic.dev.java.net/

I *knew*, in all that rambling, I would forget to
get to the point!  Lucky you happened by.

> IIRC, it is intended that Java SE 6 will include a version of this when
> it is released next year.

Cool!  I'm looking forward to using SE6 more and more.
ashish.hearts@gmail.com - 15 Nov 2005 11:58 GMT
> ..
> >> Note that JEditorPane is not...
[quoted text clipped - 11 lines]
>
> Cool!  I'm looking forward to using SE6 more and more.

Thanks a lot for this suggestion and link. It is of little help to me.
Thank you once again.
Andrew Thompson - 15 Nov 2005 12:15 GMT
...
>>>On the bright side, there is a project to integrate modern browsers as
>>>components.
>>>
>>>https://jdic.dev.java.net/
..
>>>IIRC, it is intended that Java SE 6 will include a version of this when
>>>it is released next year.
..
> Thanks a lot for this suggestion and link. It is of little help to me.

'You poor thing'  :-(

(shrugs) Short of you being a lot more explicit about
things such as..
- the requirements of your application
- the general nature of the HTML you are attempting
to render (E.G. internet or the company intranet)
- The minimum Java expected of the client
- The reasons an embedded browser would not fulfill
your user's requirements.
..that is about all that can be added.
Thomas Hawtin - 15 Nov 2005 13:29 GMT
>> IIRC, it is intended that Java SE 6 will include a version of this
>> when it is released next year.
>
> Cool!  I'm looking forward to using SE6 more and more.

Oops, that appears to be (no longer) the case. Deferred to Dolphin (Java
SE 7).

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

zero - 16 Nov 2005 00:22 GMT
Thomas Hawtin <usenet@tackline.plus.com> wrote in news:4379a817$0$1468
$ed2619ec@ptn-nntp-reader01.plus.net:

>> Note that JEditorPane is not considered robust enough
>> to use as a general HTML parser/renderer for HTML documents
[quoted text clipped - 15 lines]
>
> Tom Hawtin

I thought it was already possible to use existing browers inside Java
applications?  About a year ago I went looking for a substitute for
JEditorPane to render HTML and I seem to remember that was one of the
options.
Steve Sobol - 18 Nov 2005 06:05 GMT
> On the bright side, there is a project to integrate modern browsers as
> components.
>
> https://jdic.dev.java.net/

http://jrex.mozdev.org

quite an impressive effort... uses JNI to wrap Java around the Gecko Runtime
Environment, upon which Mozilla and a bunch of other browsers are based.

Works with AWT and Swing, and I personally got it working with SWT.

Signature

Steve Sobol, Professional Geek   888-480-4638   PGP: 0xE3AE35ED
Company website: http://JustThe.net/
Personal blog, resume, portfolio: http://SteveSobol.com/
E: sjsobol@JustThe.net Snail: 22674 Motnocab Road, Apple Valley, CA 92307



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.