Code example for PropertyResourceBundle

Methods: getString

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