question: public void componentHidden ( ComponentEvent e ) { Layer layer = getLayer ( ) ; if ( layer != null ) { if ( e . getComponent ( ) == layer ) { if ( getState ( ) != false && menuType == LAYERS_ON_OFF ) { setState ( false ) ; if ( Debug . debugging ( "layersmenu" ) ) { Debug . output ( "layersmenu.LCBMI: layer " + layer . getName ( ) + " is now hidden." ) ; } } } else if ( e . getComponent ( ) == layer . getPalette ( ) && menuType == PALETTES_ON_OFF ) { setState ( false ) ; } } }
target:  This menu item listens to the status of its layer. If the layer becomes invisible, it disables the check box.