230 |
} |
} |
231 |
|
|
232 |
/** |
/** |
233 |
* Creates an ImageIcon from the given file with as initial |
* Constructs an ImageIcon given a filename. The icon's description |
234 |
* description the file name. |
* is initially set to the filename itself. A filename of "" means |
235 |
|
* create a blank icon. |
236 |
|
* |
237 |
|
* @param filename name of file to load or "" for a blank icon |
238 |
*/ |
*/ |
239 |
public ImageIcon(String file) |
public ImageIcon(String filename) |
240 |
{ |
{ |
241 |
this(file, file); |
this(filename, filename); |
242 |
} |
} |
243 |
|
|
244 |
/** |
/** |
245 |
* Creates an ImageIcon from the given file and sets the given |
* Constructs an ImageIcon from the given filename, setting its |
246 |
* description. |
* description to the given description. A filename of "" means |
247 |
|
* create a blank icon. |
248 |
|
* |
249 |
|
* @param filename name of file to load or "" for a blank icon |
250 |
|
* @param description human-readable description of this icon |
251 |
*/ |
*/ |
252 |
public ImageIcon(String file, String description) |
public ImageIcon(String filename, String description) |
253 |
{ |
{ |
254 |
this(Toolkit.getDefaultToolkit().getImage(file), description); |
this(Toolkit.getDefaultToolkit().getImage(filename), description); |
255 |
} |
} |
256 |
|
|
257 |
/** |
/** |