Way to do it

I wanted to render a HTML pages using JAVA.What I had as my options were gecko,webkit.But none of them were works for me.Finally I got this nice java libraries called "CORBRA"
I will show you how to use it


import javax.swing.*;
import org.lobobrowser.html.gui.*;
import org.lobobrowser.html.test.*;

public class test_navigate {
public static void main(String[] args) throws Exception {
JFrame window = new JFrame();
HtmlPanel panel = new HtmlPanel();
window.getContentPane().add(panel);
window.setSize(600, 400);
window.setVisible(true);
new SimpleHtmlRendererContext(panel, new SimpleUserAgentContext())
.navigate("http://localhost/a.html");
}
}
Here I have use WAMP server as my web server and a.html is the html that we render.

Saturday, March 13, 2010

Here we have to use the corbra tool kit