} catch (NumberFormatException e) {
	public static Font decode(String fontspec) {		String name = null;		int style = PLAIN;		int size = 12;		StringTokenizer st = new StringTokenizer(fontspec, "-");		while (st.hasMoreTokens()) {			String token = st.nextToken();			if (name == null) {				name = token;				continue;			}			if (token.toUpperCase().equals("BOLD")) {				style = BOLD;				continue;			}			if (token.toUpperCase().equals("ITALIC")) {				style = ITALIC;				continue;			}			if (token.toUpperCase().equals("BOLDITALIC")) {				style = BOLD + ITALIC;				continue;			}			int tokenval = 0;			try {				tokenval = Integer.parseInt(token);			} catch (NumberFormatException e) {				// Ignore			}			if (tokenval != 0)				size = tokenval;		}		return (new Font(name, style, size));	}