Jface ApplicationWindow : Application Window « SWT JFace Eclipse « Java






Jface ApplicationWindow

Jface ApplicationWindow
/*
SWT/JFace in Action
GUI Design with Eclipse 3.0
Matthew Scarpino, Stephen Holder, Stanford Ng, and Laurent Mihalkovic

ISBN: 1932394273

Publisher: Manning
*/

import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;

public class WidgetWindow extends ApplicationWindow
{
  public WidgetWindow()
  {
    super(null);
  }

  protected Control createContents(Composite parent)
  {
    getShell().setText("Widget Window");
    parent.setSize(400,250);
    return parent;
  }
  
  public static void main(String[] args)
  {
    WidgetWindow wwin = new WidgetWindow();
    wwin.setBlockOnOpen(true);
    wwin.open();
    Display.getCurrent().dispose();
  }
}



           
       








Related examples in the same category

1.Simplest ApplicationWindow
2.Simplest SWT applicationSimplest SWT application
3.JFace WindowJFace Window
4.First JFace applicationFirst JFace application