leading.setLeadingComponent ( checkBox );
// Text field with image as trailing component
WebTextField trailing = new WebTextField ( "Trailing", 10 );
trailing.setMargin ( 0, 0, 0, 2 );
trailing.setTrailingComponent ( new WebImage ( loadIcon ( "search.png" ) ) );
// Password field with image as leading component
WebPasswordField leading2 = new WebPasswordField ( "Leading", 10 );
leading2.setLeadingComponent ( new WebImage ( loadIcon ( "key.png" ) ) );
// Password field with image as trailing component
WebPasswordField trailing2 = new WebPasswordField ( "Trailing", 10 );
trailing2.setTrailingComponent ( new WebImage ( loadIcon ( "key.png" ) ) );
// Text field with image as leading and trailing components
WebTextField both = new WebTextField ( "Both", 10 );
both.setHorizontalAlignment ( WebTextField.CENTER );
both.setMargin ( 0, 2, 0, 2 );
WebImage image1 = new WebImage ( loadIcon ( "exclamation.png" ) );
image1.setCursor ( Cursor.getDefaultCursor () );
TooltipManager.setTooltip ( image1, "Some left message", TooltipWay.leading, 0 );
both.setLeadingComponent ( image1 );
WebImage image2 = new WebImage ( loadIcon ( "exclamation.png" ) );
image2.setCursor ( Cursor.getDefaultCursor () );
TooltipManager.setTooltip ( image2, "Some right message", TooltipWay.trailing, 0 );
both.setTrailingComponent ( image2 );
return new GroupPanel ( false, leading, trailing, leading2, trailing2, both );
}