public void setEditIcon ( Icon editIcon , String text ) { if ( editIcon != null ) { editButton . setIcon ( editIcon ) ; if ( text != null ) { editButton . setToolTipText ( text ) ; } editButton . setText ( "" ) ; } else { editButton . setIcon ( null ) ; if ( text != null ) { editButton . setText ( text ) ; } } }
Set the icon to use on the edit button . If no icon is specified then just the label will be used otherwise the text will be a tooltip .