Code example for PropertyResourceBundle

Methods: getString

0
    static { 
        prb = (PropertyResourceBundle)ResourceBundle.getBundle("fastpath");
    } 
 
    public static final String getString(String propertyName) {
        return prb.getString(propertyName);
    } 
 
    public static final ImageIcon getImageIcon(String imageName) {
        try { 
            final String iconURI = getString(imageName);
            final URL imageURL = cl.getResource(iconURI);
            return new ImageIcon(imageURL);
        } 
        catch (Exception ex) {
            System.out.println(imageName + " not found.");
        } 
        return null; 
    }