KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > tracelog > ui > UIUtil


1 package net.sourceforge.tracelog.ui;
2
3 import org.eclipse.swt.SWT;
4 import org.eclipse.swt.graphics.Font;
5 import org.eclipse.swt.layout.GridData;
6 import org.eclipse.swt.widgets.Composite;
7 import org.eclipse.swt.widgets.Label;
8
9 public class UIUtil {
10     private static final Font FONT_TITLE = new Font(null, "Arial", 12, SWT.BOLD);
11
12     public static void createTitle(Composite composite, String JavaDoc text) {
13         Label title = new Label(composite, SWT.NONE);
14         title.setFont(FONT_TITLE);
15         title.setText(text);
16         title.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
17         Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
18         separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
19     }
20 }
21
Popular Tags