On Mon, 29 Sep 2003 15:37:55 +0000, Kevin Meixner wrote:
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
me**********@yahoo.ca
Hi Kevin,
That is a lot to ask for. But for starters you could look at
http://java.sun.com/j2se/1.4.2/docs/...ditorPane.html.
It is a graphical component in the javax.swing package which can be set up
to show homepages. That is, show pages occordingly to the HTML 3.2
standard (I know you wrote HTML 4.01, but try it anyway).
Here some code to show how easy it is to use:
import javax.swing.*;
import java.net.*;
public class GoogleViewer extends JFrame {
public static void main (String[] args) throws Exception {
new GoogleViewer ();
}
public GoogleViewer () throws Exception {
super ("GoogleViewer");
getContentPane ().add (new JEditorPane (new URL ("http://www.google.com")));
setSize (300, 400);
setVisible (true);
}
}
If you want to run it remember to put it in a file called
GoogleViewer.java.
Best regards
Kristian