public static void replaceText(JComponent component){
  final Iterator<Component> children=IJSwingUtilities.getChildren(component);
  while (children.hasNext()) {
    Component child=children.next();
    if (child instanceof JLabel) {
      final JLabel label=(JLabel)child;
      String oldText=label.getText();
      if (oldText != null) {
        label.setText(doReplace(oldText));
      }
    }
 else     if (child instanceof AbstractButton) {
      AbstractButton button=(AbstractButton)child;
      String oldText=button.getText();
      if (oldText != null) {
        button.setText(doReplace(oldText));
      }
    }
  }
}

public static void replaceText ( JComponent component ) { final Iterator < Component > children = IJSwingUtilities . getChildren ( component ) ; while ( children . hasNext ( ) ) { Component child = children . next ( ) ; if ( child instanceof JLabel ) { final JLabel label = ( JLabel ) child ; String oldText = label . getText ( ) ; if ( oldText != null ) { label . setText ( doReplace ( oldText ) ) ; } } else if ( child instanceof AbstractButton ) { AbstractButton button = ( AbstractButton ) child ; String oldText = button . getText ( ) ; if ( oldText != null ) { button . setText ( doReplace ( oldText ) ) ; } } } }
replace $ product $ - > applicationnamesinfo . getinstance ( ) . getproductname ( ) $ fullname $ - > applicationnamesinfo . getinstance ( ) . getfullproductname ( ) in text of component ' s labels
