TabFolder erstellen

Gertsch

Grünschnabel
Hallo!

Bin noch neu bei Java und möchte für ein Schulprojekt ein Programm schreiben, welches auf einem TabFolder aufbaut. Habe bereits im Eclipse mit einer SWT Application begonnen und würde diese jetzt gerne im nachhinein auf einem Tab darstellen, wie müsste ich den code hier ergänzen?

danke für tips!

public class overview {

private org.eclipse.swt.widgets.Shell sShell = null;


private Button button = null;
private Button button1 = null;
private Text textArea = null;
private Label label = null;
private Button button2 = null;
private Button button3 = null;
private Button button4 = null;
private Text text = null;
private Button button5 = null;
private Button radioButton = null;
private Button radioButton1 = null;
private Button butOpen = null;
public static void main(String[] args) {
org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
overview thisClass = new overview();
thisClass.createSShell() ;
thisClass.sShell.open();
TabFolder tab = new TabFolder(thisClass.sShell,SWT.TOP);

while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep ();
}
display.dispose();
}

private void createSShell() {
sShell = new org.eclipse.swt.widgets.Shell();
button = new Button(sShell, SWT.NONE);
button1 = new Button(sShell, SWT.NONE);
textArea = new Text(sShell, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER);
label = new Label(sShell, SWT.NONE);
button2 = new Button(sShell, SWT.NONE);
button3 = new Button(sShell, SWT.NONE);
button4 = new Button(sShell, SWT.NONE);
text = new Text(sShell, SWT.BORDER);
button5 = new Button(sShell, SWT.NONE);
radioButton = new Button(sShell, SWT.RADIO);
radioButton1 = new Button(sShell, SWT.RADIO);
butOpen = new Button(sShell, SWT.NONE);
sShell.setSize(new org.eclipse.swt.graphics.Point(640,480));
sShell.setText("Vokabeltrainer 009");
sShell.setFont(new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getDefault(), "@Arial Unicode MS", 10, org.eclipse.swt.SWT.BOLD));
button.setBounds(new org.eclipse.swt.graphics.Rectangle(83,46,43,39));
button.setText("Öffnen");
button1.setBounds(new org.eclipse.swt.graphics.Rectangle(139,46,43,39));
button1.setText("Speich.");
textArea.setBounds(new org.eclipse.swt.graphics.Rectangle(49,203,351,157));
label.setBounds(new org.eclipse.swt.graphics.Rectangle(333,55,288,33));
label.setText("");
label.setFont(new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getDefault(), "@Arial Unicode MS", 8, org.eclipse.swt.SWT.BOLD));
button2.setBounds(new org.eclipse.swt.graphics.Rectangle(40,378,130,35));
button2.setText("Hinzufügen");
button3.setBounds(new org.eclipse.swt.graphics.Rectangle(180,378,130,35));
button3.setText("Bearbeiten");
button4.setBounds(new org.eclipse.swt.graphics.Rectangle(320,378,130,35));
button4.setText("Löschen");
text.setBounds(new org.eclipse.swt.graphics.Rectangle(41,130,179,35));
button5.setBounds(new org.eclipse.swt.graphics.Rectangle(233,130,117,34));
button5.setText("Wort suchen");
radioButton.setBounds(new org.eclipse.swt.graphics.Rectangle(395,126,181,24));
radioButton.setText(" Deutsch - Fremdsprache");
radioButton1.setBounds(new org.eclipse.swt.graphics.Rectangle(395,156,181,24));
radioButton1.setText(" Fremdsprache - Deutsch");
butOpen.setText("Neu");
butOpen.setImage(new Image(Display.getCurrent(), "C:/WINDOWS/shop.ico"));
butOpen.setLocation(new org.eclipse.swt.graphics.Point(27,46));
butOpen.setSize(new org.eclipse.swt.graphics.Point(40,40));

......
 
Zurück