In case you need to show some web pages in an embedded browser in a Java Rich Client application you can use an SWT component of Eclipse.

This makes it quite easy, if you cannot use JavaFX 2.0 yet in order to do the trick because the client computers are running on older Java versions.

Source Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package dbDesktop;
 
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
 
public class dbDesktopBrowser {
 
	/**
	 * Launch the application.
	 
	 * @param args
	 */
	public static void main(String[] args) {
		Display display = Display.getDefault();
		Shell shell = new Shell();
		shell.setSize(772, 528);
		shell.setText("SWT Application");
		shell.setLayout(new FillLayout(SWT.HORIZONTAL));
 
		Browser browser = new Browser(shell, SWT.NONE);
		browser.setUrl("https://www.some.url");
		browser.refresh();
 
		shell.open();
		shell.layout();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
 
	}
}