Setting a Description for Image Icons

<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>

Setting a Description for Image Icons

Image icons can be inserted in a variety of places such as in a text
or tree component. You should set a description for image icons to
help blind users.
ImageIcon icon = new ImageIcon("image.gif");
icon.setDescription("Description of Image");

ImageIcon的setDescription方法的用法如下:

setDescription
public void setDescription(String description)
设置图像的描述。此描述应该是该对象的简明文本描述。例如,可以将它呈现给盲人用户,为他们提供该图像用途的指示。

参数:
description - 图像的简明文本描述。

首先创建一个ImageIcon的对象,参数为图像文件名,然后setDescription,参数为描述的文本。

你可能感兴趣的:(C++,c,C#)