1 14 package wingset; 15 16 import org.wings.*; 17 18 22 public class WingsImage 23 extends SPanel { 24 private static final SIcon WINGS_IMAGE = new SURLIcon("../icons/wings-logo.png"); 25 26 public WingsImage() { 27 add(createExample()); 28 } 29 30 public SComponent createExample() { 31 SPanel p = new SPanel(); 32 final SBorderLayout layout = new SBorderLayout(); 33 34 setHorizontalAlignment(SConstants.CENTER); 35 p.setLayout(layout); 36 37 SLabel label = new SLabel(WINGS_IMAGE); 38 label.setHorizontalAlignment(SConstants.CENTER); 39 p.add(label, SBorderLayout.CENTER); 40 41 label = new SLabel("Welcome to"); 42 label.setHorizontalAlignment(SConstants.CENTER); 43 p.add(label, SBorderLayout.NORTH); 44 45 46 label = new SLabel("Have fun!"); 47 label.setHorizontalAlignment(SConstants.CENTER); 48 p.add(label, SBorderLayout.SOUTH); 49 50 return p; 51 } 52 } 53 54 55 | Popular Tags |