question: public void actionPerformed ( ActionEvent ae ) { String command = ae . getActionCommand ( ) ; if ( command == DisplayPaletteCmd ) { if ( Debug . debugging ( "layer" ) ) { Debug . output ( getName ( ) + " displaying palette" ) ; } showPalette ( ) ; } else if ( command == HidePaletteCmd ) { if ( Debug . debugging ( "layer" ) ) { Debug . output ( getName ( ) + " hiding palette" ) ; } hidePalette ( ) ; } else if ( command == DisplayPropertiesCmd ) { Inspector inspector = new Inspector ( ) ; inspector . inspectPropertyConsumer ( this ) ; } }
target:  The default actionPerformed method for Layer. Make sure you call super.actionPerformed if you care about receiving palette show/hide commands. This method is also set up to receive the DisplayPropertiesCmd, and will bring up the Inspector for the layer.