June 2005
Beginner to intermediate
336 pages
6h 29m
English
As shown earlier in Figure 8.1, the Browser project uses ToolBar, Text, and Browser widgets. It starts by creating a good-sized shell to display the browser in:
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
public class BrowserProject
{
Display display;
Shell shell;
public static void main(String[] args)
{
new BrowserProject();
}
BrowserProject()
{
display = new Display();
shell = new Shell(display);
shell.setText("The Browser Project");
shell.setSize(600, 500);
.
.
.
}
Then it creates the toolbar and buttons you see in Figure 8.1:
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
public class BrowserProject
{
Display display;
Shell shell;
ToolBar toolbar;
ToolItem go, forward, back, refresh, ...Read now
Unlock full access