Results 1 to 1 of 1
Thread: First JFace application
-
First JFace application
Java Code:import org.eclipse.jface.window.ApplicationWindow; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.*; /** * Your first JFace application */ public class HelloWorld extends ApplicationWindow { /** * HelloWorld constructor */ public HelloWorld() { super(null); } /** * Runs the application */ public void run() { // Don't return from open() until window closes setBlockOnOpen(true); // Open the main window open(); // Dispose the display Display.getCurrent().dispose(); } /** * Creates the main window's contents * * @param parent the main window * @return Control */ protected Control createContents(Composite parent) { // Create a Hello, World label Label label = new Label(parent, SWT.CENTER); label.setText("Hello, World"); return label; } /** * The application entry point * * @param args the command line arguments */ public static void main(String[] args) { new HelloWorld().run(); } }"The sole cause of man’s unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
Similar Threads
-
JFace Window
By Java Tip in forum SWTReplies: 0Last Post: 07-02-2008, 08:12 PM -
Launching an application from another application dynamically
By Java Tip in forum Java TipReplies: 0Last Post: 02-16-2008, 09:31 PM -
Launching an application from another application using thread
By Java Tip in forum Java TipReplies: 0Last Post: 02-16-2008, 09:29 PM -
how to import jface in java swt
By rajaletchumy in forum New To JavaReplies: 1Last Post: 08-08-2007, 12:31 AM -
Jface + Gef
By Eric in forum Advanced JavaReplies: 1Last Post: 07-05-2007, 08:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks