Source Code : Group Example
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Group Example

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
public class GroupShellExample {
Display d;
Shell s;
GroupShellExample() {
d = new Display();
s = new Shell(d);
s.setSize(200, 200);
s.setText("A Shell Composite Example");
final GroupExample ge = new GroupExample(s, SWT.SHADOW_ETCHED_IN);
ge.setLocation(20, 20);
s.open();
while (!s.isDisposed()) {
if (!d.readAndDispatch())
d.sleep();
}
d.dispose();
}
public static void main(String[] arg) {
new GroupShellExample();
}
}
class GroupExample extends Composite {
final Button b1;
final Button b2;
final Button b3;
public GroupExample(Composite c, int style) {
super(c, SWT.NO_BACKGROUND);
this.setSize(110, 75);
this.setLayout(new FillLayout());
final Group g = new Group(this, style);
g.setSize(110, 75);
g.setText("Options Group");
b1 = new Button(g, SWT.RADIO);
b1.setBounds(10, 20, 75, 15);
b1.setText("Option One");
b2 = new Button(g, SWT.RADIO);
b2.setBounds(10, 35, 75, 15);
b2.setText("Option Two");
b3 = new Button(g, SWT.RADIO);
b3.setBounds(10, 50, 80, 15);
b3.setText("Option Three");
}
public String getSelected() {
if (b1.getSelection())
return "Option One";
if (b2.getSelection())
return "Option Two";
if (b3.getSelection())
return "Option Three";
return "None Selected";
}
}
Thank with us