JToggleButton button = null;
if (imageResourceName != null) {
ImageIcon icon = getImageIcon( resourceClass, imageResourceName );
if( icon != null ) {
button = new BorderlessImageToggleButton( action, icon );
}
}
if( button == null ) {
button = new JToggleButton( action );