jButton1.setText(null);
jButton1.setIcon(createImageIconRemote(iconGathering, ""));
/**
* read icon image from remote server
*/
public ImageIcon createImageIconRemote(String url, String description) {
try {
return new ImageIcon(new URL(url), description);
} catch (java.net.MalformedURLException e) {
}
return null;
}
jButton1.setIcon(createImageIconRemote(iconGathering, ""));
/**
* read icon image from remote server
*/
public ImageIcon createImageIconRemote(String url, String description) {
try {
return new ImageIcon(new URL(url), description);
} catch (java.net.MalformedURLException e) {
}
return null;
}
add(btn);