1

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.

1
  • Some might argue that a simple web browser does not need support JavaScript or CSS. Commented Mar 11, 2010 at 16:45

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

lol, you're damn right. Thanx for your reply, I'll look into it.
1

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 ...

2 Comments

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.