How to embed Internet Explorer object into a java form

I am using jbuilder 2005 how can I (Steps, tutorial, ...) embed Microsoft Internet Explorer into my form?
Who is Participating?
neuromouseConnect With a Mentor Commented:
here's the code. First you have to get SWT working for your JBuilder.
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.browser.Browser; 

public class SWTBrowser extends Composite { 
	private Browser browser = null; 

	 * This method initializes browser	
	private void createBrowser() {
		browser = new Browser(this, SWT.NONE);
	 * @param args
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		/* Before this is run, be sure to set up the launch configuration (Arguments->VM Arguments)
		 * for the correct SWT library path in order to run with the SWT dlls. 
		 * The dlls are located in the SWT plugin jar.  
		 * For example, on Windows the Eclipse SWT 3.1 plugin jar is:
		 *       installation_directory\plugins\org.eclipse.swt.win32_3.1.0.jar
		Display display = Display.getDefault();
		Shell shell = new Shell(display);
		shell.setLayout(new FillLayout());
		shell.setSize(new Point(640, 480));
		SWTBrowser thisClass = new SWTBrowser(shell, SWT.NONE);; 
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
	public SWTBrowser(Composite parent, int style) {
		super(parent, style);
	private void initialize() {
		this.setLayout(new FillLayout());
		browser.setUrl(testURL); // put your URL here
		setSize(new Point(768, 576));
	public void setURL(String url) {

Open in new window

eugie17Author Commented:
is it possible to embed the IE to java frame?
so that the document javascript and dom can be active?
I used to do this using SWT. Google a little, and meanwhile, I'll check if I have this code anywhere.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.