Developer(s) | Eclipse Foundation |
---|---|
Stable release | 3.9.1
/ July 25, 2013 |
Repository | |
Operating system | Cross-platform |
Available in | Multilingual |
Type | widget toolkit for the Java platform |
License | Eclipse Public License |
Website |
wiki |
JFace is defined by the Eclipse project as "a UI toolkit that provides helper classes for developing UI features that can be tedious to implement." [1] The Standard Widget Toolkit (SWT) is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.
It is a layer that sits on top of the raw widget system, and provides classes for handling common UI programming tasks. It brings model view controller programming to the Standard Widget Toolkit.
The following is a basic Hello World program using JFace.
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;
public class HelloWorld extends ApplicationWindow {
public static void main(String[] args) {
new HelloWorld().run();
}
public HelloWorld() {
super(null);
}
public void run() {
setBlockOnOpen(true);
open();
Display.getCurrent().dispose();
}
protected Control createContents(Composite parent) {
Label label = new Label(parent, SWT.CENTER);
label.setText("Hello, World");
return label;
}
}
Developer(s) | Eclipse Foundation |
---|---|
Stable release | 3.9.1
/ July 25, 2013 |
Repository | |
Operating system | Cross-platform |
Available in | Multilingual |
Type | widget toolkit for the Java platform |
License | Eclipse Public License |
Website |
wiki |
JFace is defined by the Eclipse project as "a UI toolkit that provides helper classes for developing UI features that can be tedious to implement." [1] The Standard Widget Toolkit (SWT) is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.
It is a layer that sits on top of the raw widget system, and provides classes for handling common UI programming tasks. It brings model view controller programming to the Standard Widget Toolkit.
The following is a basic Hello World program using JFace.
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;
public class HelloWorld extends ApplicationWindow {
public static void main(String[] args) {
new HelloWorld().run();
}
public HelloWorld() {
super(null);
}
public void run() {
setBlockOnOpen(true);
open();
Display.getCurrent().dispose();
}
protected Control createContents(Composite parent) {
Label label = new Label(parent, SWT.CENTER);
label.setText("Hello, World");
return label;
}
}