Source Code : Widget Test

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Widget Test

/*******************************************************************************
 * Copyright (c) 2004 Berthold Daum. All rights reserved. This program and the
 * accompanying materials are made available under the terms of the Common
 * Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors: Berthold Daum
 ******************************************************************************/

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class widgetTest {

  public static void main(String[] args) {
    // Create Display instance
    final Display display = new Display();
    // Create top level Shell (pass display as parent)
    final Shell toplevelShell = new Shell(display);
    // Set title line
    toplevelShell.setText("TopLevel.Titelzeile");
    // Display shell
    toplevelShell.open();
    // Create a dialog shell (pass toplevelShell as parent)
    final Shell dialogShell = new Shell(toplevelShell);
    // Set title line
    dialogShell.setText("Dialog.Titelzeile");
    // Display shell
    dialogShell.open();
    // Wait until top level shell is closed
    while (!toplevelShell.isDisposed()) {
      // Check for waiting events
      if (!display.readAndDispatch())
        display.sleep();
    }
  }
}



           
       

Thank with us