Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Group kunde = new Group(shell,SWT.SHADOW_ETCHED_IN);
kunde.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED));
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
/****************************************************************************
* <h1>
* Title: GroupExample.java
* </h1>
* <p>
* Description:
* </p>
* <p>
* Copyright: Copyright (c) 2007
* </p>
*
* @date 06.09.2007
* @time 13:35:36
* @version 0.1
* --------------------------------------------------------------------------
* @lastedit 06.09.2007 - 13:35:36
***************************************************************************/
public class GroupExample {
protected Shell shell;
protected Display display;
private Color red = new Color(display, 255,0,0);
/**
* Launch the application
* @param args
*/
public static void main(String[] args) {
try {
GroupExample window = new GroupExample();
window.open();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Open the window
*/
public void open() {
final Display display = Display.getDefault();
createContents();
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
/**
* Create contents of the window
*/
protected void createContents() {
shell = new Shell();
shell.setLayout(new GridLayout());
shell.setSize(500, 375);
shell.setText("SWT Application");
final Group gruppeMitFarbigerGroup = new Group(shell, SWT.NONE);
gruppeMitFarbigerGroup.setText("Gruppe: mit farbiger Überschrift");
final GridData gd_gruppeMitFarbigerGroup = new GridData(SWT.FILL, SWT.FILL, false, true);
gd_gruppeMitFarbigerGroup.widthHint = 276;
gruppeMitFarbigerGroup.setLayoutData(gd_gruppeMitFarbigerGroup);
gruppeMitFarbigerGroup.setLayout(new GridLayout());
gruppeMitFarbigerGroup.setForeground(red);
//
}
}