ImageIcon.setDescription(String description) has the following syntax.
public void setDescription(String description)
In the following code shows how to use ImageIcon.setDescription(String description) method.
import javax.swing.ImageIcon; public class Main { public static void main(String[] argv) throws Exception { ImageIcon icon = new ImageIcon("image.gif"); icon.setDescription("Description of Image"); } }