tags:

views:

31

answers:

2

My task is to create a simple web browser in Java. So far it can only read HTML pages. I'm using standard JEditorPane component to display webpages.

Now I was wondering is there any way you could explain me how can I manage to display at least some simple pages that contain CSS/Javascript. If you could point me to some useful links or appropriate examples I would be very happy.

+2  A: 

Well, my advice would be to look at open source rendering engines such as Gecko - https://developer.mozilla.org/en/Gecko_FAQ

You can embed Gecko with Java using the JREX library - http://jrex.mozdev.org/

Starting from scratch with a problem like this is a very big task, and as your username is AmateurProgrammer, I wouldn't recommend it.

Finbarr
lol, you're damn right.Thanx for your reply, I'll look into it.
AmateurProgrammer
+1  A: 

There alrady is some prior art for the Java browser segment.

concerning javascript, you will have to use a javascript interpreter in Java. A renowned one is Rhino (by Mozilla). Its integration may reveals to be an interesting challenge.

concerning CSS, it seems the question has already been asked ...

Riduidel
I've been searching for it but I found nothing on stackoverflow.Thanks for your contribution
AmateurProgrammer
Then consider checking the "answser" check beside my answer ;-)
Riduidel