In the designer editor, labels do not appear with the specified colors. This is closely related to the problem that the designer hangs when trying to change a color property.
Here is my source code that specifies a color... it works when running the application, but the label (which turns out to be a red box), is not red in the designer.
Thanks,
Chad
public class ClockMain {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell();
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 6;
shell.setLayout(gridLayout);
shell.setText("SWT Application");
{
final Label lbl00 = new Label(shell, SWT.NONE);
lbl00.setText("button");
lbl00.setBackground(new Color(shell.getDisplay(), new RGB(255,0,0)));
lbl00.setForeground(new Color(shell.getDisplay(), new RGB(255,0,0)));
}
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
}