public void init(){
  NamedIcon icon=(NamedIcon)getIcon();
  String name=icon.getURL();
  if (name.endsWith("loco-white.gif")) {
    _locoColor=Color.WHITE;
  }
 else   if (name.endsWith("loco-green.gif")) {
    _locoColor=Color.GREEN;
  }
 else   if (name.endsWith("loco-gray.gif")) {
    _locoColor=Color.GRAY;
  }
 else   if (name.endsWith("loco-red.gif")) {
    _locoColor=Color.RED;
  }
 else   if (name.endsWith("loco-blue.gif")) {
    _locoColor=COLOR_BLUE;
  }
 else   if (name.endsWith("loco-yellow.gif")) {
    _locoColor=Color.YELLOW;
  }
}

public void init ( ) { NamedIcon icon = ( NamedIcon ) getIcon ( ) ; String name = icon . getURL ( ) ; if ( name . endsWith ( "loco-white.gif" ) ) { _locoColor = Color . WHITE ; } else if ( name . endsWith ( "loco-green.gif" ) ) { _locoColor = Color . GREEN ; } else if ( name . endsWith ( "loco-gray.gif" ) ) { _locoColor = Color . GRAY ; } else if ( name . endsWith ( "loco-red.gif" ) ) { _locoColor = Color . RED ; } else if ( name . endsWith ( "loco-blue.gif" ) ) { _locoColor = COLOR_BLUE ; } else if ( name . endsWith ( "loco-yellow.gif" ) ) { _locoColor = Color . YELLOW ; } }
called at load time to get " background " color
