0
鑑於從Eclipse View給我的默認容器,我希望定位AWT框架和SWT標籤。我希望SWT標籤位於頂部,而AWT框架位於它的正下方。出於某種原因,我無法讓SWT標籤畫在框架之外。我希望它們是分開的,但RowLayout似乎並沒有將組件放入隔離的行中。如何在eclipse插件中定位組件?
SWT標籤不希望被放置在AWT框架內:
插件的視圖中的代碼:
public void createPartControl(Composite parent) {
container = new Composite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND);
RowLayout rowLayout = new RowLayout();
//I have tried toggling many of the RowLayout properties but this has no effect on placing the label outside of the AWT Frame.
container.setLayout(rowLayout);
Label topLabel = new Label(container, SWT.NONE);
topLabel.setText("MY NEW LABEL");
frame = org.eclipse.swt.awt.SWT_AWT.new_Frame(container);
frame.setFocusable(true);
frame.setFocusableWindowState(true);