question: private static img createControlButtonImage ( String name , String js_command , boolean enabled ) { StringBuffer imgName = new StringBuffer ( "wf" + name ) ; if ( ! enabled ) imgName . append ( "D" ) ; imgName . append ( "24.gif" ) ; img img = new img ( WebEnv . getImageDirectory ( imgName . toString ( ) ) , name ) ; if ( enabled ) img . setAlt ( Msg . getMsg ( AD_Language , name ) ) ; img . setID ( "imgButton" ) ; if ( js_command != null && js_command . length ( ) > 0 && enabled ) { img . setOnClick ( "document." + FORM_NAME + "." + M_Command + ".value='" + name + "';" + js_command ) ; } return img ; }
target:  Create Image with name, id of button_name and set M_Command onClick