SashForm
코드보기
import org.eclipse.swt.*;
import org.eclipse.swt.custom.*;
import org.eclipse.swt.widgets.*;
public class Ch3_SashForm extends Composite {
public Ch3_SashForm(Composite parent) {
super(parent, SWT.NONE);
SashForm sf = new SashForm(this, SWT.VERTICAL);
sf.setSize(120, 80);
Button button1 = new Button(sf, SWT.ARROW | SWT.UP);
button1.setSize(120, 40);
Button button2 = new Button(sf, SWT.ARROW | SWT.DOWN);
button2.setBounds(0, 40, 120, 40);
}
}
CompViewer
코드보기
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
public class CompViewer1 extends ApplicationWindow {
public CompViewer1() {
super(null);
}
protected Control createContents(Composite parent){
Ch3_SashForm cc1 = new Ch3_SashForm(parent);
return parent;
}
public static void main(String[] args) {
CompViewer1 cv = new CompViewer1();
cv.setBlockOnOpen(true);
cv.open();
Display.getCurrent().dispose();
}
}
http://dynast.tistory.com/trackback/144