Java Reference
In-Depth Information
L ISTING D.1 Continued
if (res!=null)
return new ImageIcon(res);
System.out.println(“GeneralUtilities.getImageIcon(\””+name+”\”) Couldn't
find any resource.”);
return EMPTY_ICON;
}
/**
* return the requested service
*/
public static Object getService(String fullyQName){
Object service = null;
try {
service = ServiceManager.lookup(fullyQName);
} catch (UnavailableServiceException use) {
System.out.println(“GeneralUtilities.getService(“+ fullyQName +”) “+use);
}
return service;
}
/**
* return the basic service
*/
public static BasicService getBasicService(){
if (util==null)
getInstance();
return basicService;
}
/**
* return a localized message string
*/
public static String getMsg(String key){
if (util==null)
getInstance();
if (util.msg!=null) {
String m = util.msg.getString(key);
if (m!=null)
return m;
}
return “”;
}
/**
Search WWH ::




Custom Search