Here you can find the source of getMessage(String key)
public static String getMessage(String key)
//package com.java2s; /**/* w w w . j av a 2 s . c om*/ * Created www.19drops.com * User: 19drops * Date: 13-sep-2009 * Time: 16:23:26 * <p/> * This material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License, as published by the Free Software Foundation. * <p/> * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * <p/> * You should have received a copy of the GNU Lesser General Public License * along with this distribution; if not, write to: * Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ import java.util.ResourceBundle; import java.text.MessageFormat; public class Main { public static String getMessage(String key) { return getBundle().getString(key); } public static String getMessage(String key, String... parm) { String keyValue = getBundle().getString(key); return MessageFormat.format(keyValue, parm); } private static ResourceBundle getBundle() { return ResourceBundle.getBundle("TRACdropsMessage"); } }