public void configureLabelFor ( JLabel label , JComponent component ) { Assert . notNull ( label , "label" ) ; Assert . notNull ( component , "component" ) ; configureLabel ( label ) ; if ( ! ( component instanceof JPanel ) ) { String labelText = label . getText ( ) ; if ( ! labelText . endsWith ( ":" ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Appending colon to text field label text '" + this . text + "'" ) ; } label . setText ( labelText + ":" ) ; } } label . setLabelFor ( component ) ; }
Configures the given label with the property values described by this instance and then sets it as the label for the given component .