Where to get Java Browser for development

K

Kevin Meixner

Hello,

I'm a Java newbie and I my boss has asked me to look into finding a
small Java browser for development to incorporate into a Java
application we are building. Does anyone know if such a browser exists
and where to get one?

Ideally, we need a resource-light browser that supports HTML 4.01
Transitional, CSS2, JavaScript 1.5 and XML. Currently, our application
consists of pages that are based on JSP, Java Servlets, HTML 4.01 and
CSS2. We want to display these pages inside of our Java application.

Thanks in advance for you help,

Kevin
(e-mail address removed)
 
N

nielinjie

i remenber these are some open source projects on soureceforge. search
'browser' on the site, you will get it.
 
G

Gerbrand van Dieijen

Hello,

I'm a Java newbie and I my boss has asked me to look into finding a
small Java browser for development to incorporate into a Java
application we are building. Does anyone know if such a browser exists
and where to get one?

Ideally, we need a resource-light browser that supports HTML 4.01
Transitional, CSS2, JavaScript 1.5 and XML. Currently, our application
consists of pages that are based on JSP, Java Servlets, HTML 4.01 and
CSS2. We want to display these pages inside of our Java application.

Hello,

you can start on the default HTML Component of (HTMLDocument), used by
JEditorPane. It supports only HTML 3.2 and a subset of HTML 4 (including
stylesheets), but no Javascript etc.

Very simple browser:
A Dialog with a JEditorPane in it.
Use addHyperlinkListener with the JEditorPane to catch the user selecting
a link events:
myJEditorPane.addHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType()==HyperlinkEvent.EventType.ACTIVATED)
{
URL url=e.getURL();
if (url.getProtocol().equalsIgnoreCase("http")) {
try {
JEditorPane jp=(JEditorPane)e.getSource();
jp.setPage(url);
} catch (IOException ioe) {
ioe.printStackTrace();
}
} else if
(url.getProtocol().equalsIgnoreCase("mailto")) {
... start my mail application ...
}
}
}

You could also add a toolbar etc. for more functionality.

To avoid the work or have more functionality, there are some commercial
html packages too that support much more.
With google you should be able to find a few (or more specific sites), a
stumbled on a few a while ago.

Finally, you could also use Mozilla or it's java variant (Jazilla I
thought). The latter is of course cross platform java but not so actively
developed. Mozilla is available for a lot of platforms and supports all
html standards perfectly of course, and I think you can use it as a
component.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top