Results 1 to 1 of 1
-
Simplest ApplicationWindow Example
Java Code:import org.eclipse.jface.window.ApplicationWindow; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Text; public class HelloSWT_JFace extends ApplicationWindow { public HelloSWT_JFace() { super(null); } protected Control createContents(Composite parent) { Text helloText = new Text(parent, SWT.CENTER); helloText.setText("Hello SWT and JFace!"); parent.pack(); return parent; } public static void main(String[] args) { HelloSWT_JFace awin = new HelloSWT_JFace(); awin.setBlockOnOpen(true); awin.open(); Display.getCurrent().dispose(); } }"The sole cause of mans unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
Similar Threads
-
Simplest way to read and display a jpeg image
By Hasan in forum New To JavaReplies: 1Last Post: 05-31-2007, 03:42 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks