实验chapLayoutDesign.docVIP

  • 1
  • 0
  • 约1.45万字
  • 约 7页
  • 2017-02-02 发布于江苏
  • 举报
南京信息工程大学 实验(实习)报告 实验(实习)名称 Layout Design 2 日期 2011-12-07 得分 指导老师 文学志 系 计软 专业 软国 年级 3 班次 1 姓名 杨天意 学号 20091366021 Goals of experiment: Learn how to use Eclipse VE to design layout. Processes of experiment: a) Change HorizontalSpan and HorizontalAlignment attributes of labels and texts. Design a FormLayout with four buttons. Set LayoutData of button1 as FormAttachment: Modify two statements: formData.left = new FormAttachment();-formData.left = new FormAttachment(0,50); formData.top = new FormAttachment();-formData.top = new FormAttachment(0,60); Set LayoutData of button2 as FormAttachment: Modify two statements: formData1.left = new FormAttachment();-formData.left = new FormAttachment(25,10); formData1.top = new FormAttachment();-formData1.top = new FormAttachment(20,-5); Set LayoutData of button3 as FormAttachment: Modify two statements: formData2.left = new FormAttachment();-formData2.left = new FormAttachment(2,3,-10); formData2.top = new FormAttachment();-formData2.top = new FormAttachment(3,4,5); Set LayoutData of button4 as FormAttachment: Modify two statements: formData3.left = new FormAttachment();-formData3.left = new FormAttachment(button2); formData3.top = new FormAttachment();-formData3.top = new FormAttachment(button2); formData3.left = new FormAttachment(button2); formData3.top = new FormAttachment(button2); formData3.left = new FormAttachment(button2); formData3.bottom = new FormAttachment(button2); formData3.right = new FormAttachment(button2); formData3.top = new FormAttachment(button2); formData3.right = new FormAttachment(button2); formData3.bottom = new FormAttachment(button2); Results of experiment: FormLayoutTest.java import org.eclipse.swt.*; public class FormLayoutTest { private Shell sShell = null; private Button button1 = null; private Button button2 = null; private Button button3 = null; private Button button4 = null; public static void main(String[] ar

文档评论(0)

1亿VIP精品文档

相关文档