question: protected boolean addNewIcon ( String name ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "addNewIcon Action: iconMap.size()= " + _iconMap . size ( ) ) ; } if ( name == null || name . length ( ) == 0 ) { JOptionPane . showMessageDialog ( _parent . _paletteFrame , Bundle . getMessage ( "NoIconName" ) , Bundle . getMessage ( "WarningTitle" ) , JOptionPane . WARNING_MESSAGE ) ; return false ; } else if ( _iconMap . get ( name ) != null ) { JOptionPane . showMessageDialog ( _parent . _paletteFrame , Bundle . getMessage ( "DuplicateIconName" , name ) , Bundle . getMessage ( "WarningTitle" ) , JOptionPane . WARNING_MESSAGE ) ; return false ; } String fileName = "resources/icons/misc/X-red.gif" ; NamedIcon icon = new jmri . jmrit . catalog . NamedIcon ( fileName , fileName ) ; _iconMap . put ( name , icon ) ; return true ; }
target:  Action item for makeAddIconButtonPanel