Mega Code Archive

 
Categories / Java Tutorial / SWT
 

Introducing Label

Labels are non-selectable user interface components that display strings or images. Styles supported by the Label class are as follows: SEPARATOR, HORIZONTAL, VERTICAL The SEPARATOR style causes a label to appear as a single line whose orientation can be either HORIZONTAL (default) or VERTICAL. To create a Label, use its only constructor: Label(Composite parent, int style) parent: the Composite to house the Label, style : the style. Labels display either text or an image, but not both.