Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は SWT が初めてで、CTabItem でコントロールの位置を任意に設定する必要があります。
次のコードを使用しましたが、配置効果がないようで、コンポーネントを (0, 0) に追加するだけです
Label userName = new Label(folder, SWT.NONE); userName.setText("username"); userName.setBounds(10, 200, 200, 50); item.setControl(userName);
folderたとえば、次のように LayoutManager を設定する必要があります。
folder
folder.setLayout(new GridLayout());
コントロールに特定の寸法を与えたい場合は、LayoutData を与えることを検討してください。
GridData gd = new GridData(); gd.height = 50; userName.setLayoutData(gd);
あなたの例に何itemがあるかわかりませんが、必要ではないようです。
item