親フォルダ
01.import org.eclipse.jface.window.ApplicationWindow;
02.import org.eclipse.swt.SWT;
03.import org.eclipse.swt.custom.ScrolledComposite;
04.import org.eclipse.swt.graphics.Point;
05.import org.eclipse.swt.widgets.Composite;
06.import org.eclipse.swt.widgets.Control;
07.import org.eclipse.swt.widgets.Display;
08.import org.eclipse.swt.widgets.Shell;
09.import org.eclipse.swt.widgets.Text;
10.import org.eclipse.ui.forms.widgets.FormToolkit;
11. 
12.public class Form extends ApplicationWindow {
13.    private Text[] text = new Text[30];
14.    private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
15.    private Text text_1;
16.    private Composite composite;
17. 
18.    public Form() {
19.        super(null);
20.        createActions();
21.    }
22. 
23.    @Override
24.    protected Control createContents(Composite parent) {
25.        Composite container = new Composite(parent, SWT.NONE);
26.        {
27.            ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
28.            scrolledComposite.setBounds(0, 0, 776, 498);
29.            formToolkit.adapt(scrolledComposite);
30.            formToolkit.paintBordersFor(scrolledComposite);
31.            scrolledComposite.setExpandHorizontal(true);
32.            scrolledComposite.setExpandVertical(true);
33.            {
34.                composite = new Composite(scrolledComposite, SWT.NONE);
35.                formToolkit.adapt(composite);
36.                formToolkit.paintBordersFor(composite);
37.                {
38.                    for( int i = 0; i < 30; i++ ) {
39.                        text[i] = new Text(composite, SWT.BORDER);
40.                        text[i].setBounds(86, 10 + i*30, 338, 21);
41.                        formToolkit.adapt(text[i], true, true);
42.                    }
43.                }
44.            }
45.            scrolledComposite.setContent(composite);
46.            scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
47.        }
48. 
49.        return container;
50.    }
51. 
52.    private void createActions() {
53.        // Create the actions
54.    }
55. 
56.    public static void main(String args[]) {
57.        try {
58.            Form window = new Form();
59.            window.setBlockOnOpen(true);
60.            window.open();
61.            Display.getCurrent().dispose();
62.        } catch (Exception e) {
63.            e.printStackTrace();
64.        }
65.    }
66. 
67.    @Override
68.    protected void configureShell(Shell newShell) {
69.        super.configureShell(newShell);
70.        newShell.setText("New Application");
71.    }
72. 
73.    @Override
74.    protected Point getInitialSize() {
75.        return new Point(792, 551);
76.    }
77.}