Shawn Shroyer
Shawn Shroyer

Reputation: 923

When writing a internet browser in java

I came across the problem of not having an editor kit that could not handle some parts of a webpage. Examples include javascript and css. Does anyone know where I can find an editor kit that is suitable for that? Also I'm curious as to what programming language browsers like Google Chrome and IE use.

Upvotes: 0

Views: 134

Answers (2)

titogeo
titogeo

Reputation: 2184

Try Aptana Studio

Upvotes: 2

Joop Eggen
Joop Eggen

Reputation: 109547

There are already miscellaneous browser projects using java. The java Scripting API supporting undermore JavaScript (JS sometime named ECMAScript) will be worth looking into. You should on reading the HTML, construct a DOM tree and interprete <script> blocks, which may operate on the DOM or write HTML you have to read from.

The EditorKit in swing builds a too simple non.tree StyledDocument, which you have to bridge.

The way to proceed would be to first not use swing output but immediately generate a DOM/generated HTML.

Upvotes: 1

Related Questions