Example usage for org.eclipse.swt.widgets Composite setFont

List of usage examples for org.eclipse.swt.widgets Composite setFont

Introduction

In this page you can find the example usage for org.eclipse.swt.widgets Composite setFont.

Prototype

public void setFont(Font font) 

Source Link

Document

Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.

Usage

From source file:WidgetTest2.java

public static Composite createComposite(Composite parent) {
    /** * Composite ** */
    //       Create new Composite instance
    final Composite composite = new Composite(parent, 0);
    //       Get properties from the containing composite
    composite.setBackground(parent.getBackground());
    composite.setForeground(parent.getForeground());
    composite.setFont(parent.getFont());
    //       Set position and size
    composite.setBounds(X, Y, WIDTH, HEIGHT);
    return composite;
}