Changeset 182 for trunk/tests/SWT/java
- Timestamp:
- Aug 26, 2009, 7:32:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/SWT/java/SWT009_07.java
r23 r182 32 32 void initComponents() { 33 33 shell.setText("Hello World Group"); 34 // shell.setSize(300, 300); 35 shell.setLayout(new FillLayout()); 36 shell.setText("Group Examples"); 37 Group group0 = new Group(shell, SWT.NULL); 38 group0.setLayout(new FillLayout()); 39 Label label = new Label(group0, SWT.NULL); 40 label.setAlignment(SWT.CENTER); 41 label.setText("a group without title."); 42 43 Group group1 = new Group(shell, SWT.NULL); 44 group1.setText("SWT.NULL"); 45 46 Group group2 = new Group(shell, SWT.SHADOW_ETCHED_IN); 47 group2.setText("SWT.SHADOW_ETCHED_IN"); 48 49 Group group3 = new Group(shell, SWT.SHADOW_ETCHED_OUT); 50 group3.setText("SWT.SHADOW_ETCHED_OUT"); 51 52 Group group4 = new Group(shell, SWT.SHADOW_IN); 53 group4.setText("SWT.SHADOW_IN"); 54 55 Group group5 = new Group(shell, SWT.SHADOW_OUT); 56 group5.setText("SWT.SHADOW_OUT"); 57 58 59 Group[] groups = new Group[]{group0, group1, group2, group3, group4, group5}; 60 61 for(int i=0; i<groups.length; i++) { 62 groups[i].setBounds(10, 10 + i * 50, 300, 40); 63 } 64 65 shell.pack(); 34 shell.setSize(200, 200); 35 shell.setText("A Group Example"); 36 final Group g = new Group(shell, SWT.SHADOW_ETCHED_IN); 37 g.setSize(110, 75); 38 g.setText("Options Group"); 39 final Button b1; 40 final Button b2; 41 final Button b3; 42 b1 = new Button(g, SWT.RADIO); 43 b1.setBounds(10, 20, 75, 15); 44 b1.setText("Option One"); 45 b2 = new Button(g, SWT.RADIO); 46 b2.setBounds(10, 35, 75, 15); 47 b2.setText("Option Two"); 48 b3 = new Button(g, SWT.RADIO); 49 b3.setBounds(10, 50, 80, 15); 50 b3.setText("Option Three"); 51 g.pack(); 52 g.setLocation(20, 20); 66 53 shell.open(); 67 54
Note:
See TracChangeset
for help on using the changeset viewer.