Results 1 to 1 of 1
Thread: First SWT Label
-
First SWT Label
Java Code:import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; public class FirstSWTClass { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("First SWT Application"); shell.setSize(250, 250); Label label = new Label(shell, SWT.CENTER); label.setText("Greetings from SWT"); label.setBounds(shell.getClientArea()); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }"The sole cause of man’s unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
Similar Threads
-
How to use Continue with a label
By Java Tip in forum java.langReplies: 0Last Post: 04-17-2008, 07:46 PM -
How to use Break with a label
By Java Tip in forum java.langReplies: 0Last Post: 04-17-2008, 07:45 PM -
Getting disk label
By Java Tip in forum Java TipReplies: 0Last Post: 02-05-2008, 09:07 AM -
Example of SWT Label
By Java Tip in forum Java TipReplies: 0Last Post: 01-09-2008, 12:02 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks