Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.me.myapp;
- 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 MyJFaceApp extends ApplicationWindow
- {
- public MyJFaceApp()
- {
- 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 )
- {
- MyJFaceApp awin = new MyJFaceApp();
- awin.setBlockOnOpen(true);
- awin.open();
- Display.getCurrent().dispose();
- }
- }
Add Comment
Please, Sign In to add comment