public class Vocabulary {
private static Properties vocabulary;
public static final String NO_ENTRIES;
public static final String ID_ERROR;
static {
vocabulary = new Properties();
try {
vocabulary.load(new FileInputStream(FILE));
}
catch (IOException e) {
e.printStackTrace();
}
NO_ENTRIES = vocabulary.getProperty("noEntry");
ID_ERROR = vocabulary.getProperty("idError");
}
JMenu menu = new JMenu(Vocabulary.NO_ENTRIES);
public void setMenuName(String MName, String MLabel)
{
if(MLabel.startswith("mnu"))
{
//Hier das JMenu setzen
}
else
{
//Hier das JMenuItem setzen
}
}