// Get the value of the key as a list of strings
List menuList = bundle.getStringList(key);
// Create a MenuBar
JMenuBar menubar = new JMenuBar();
// Create a JMenu for each of the menu property names,
// and add it to the bar
int nummenus = menuList.size();
for(int i = 0; i < nummenus; i++) {
menubar.add((JMenu) bundle.getResource((String)menuList.get(i),
JMenu.class));
}
return menubar;