Here you can find the source of createItem(String name, Integer mnem, KeyStroke accel)
protected static JMenuItem createItem(String name, Integer mnem, KeyStroke accel)
//package com.java2s; import javax.swing.JMenuItem; import javax.swing.KeyStroke; public class Main { /**//from ww w. j a v a2s . co m * Creates and configures a menu item. */ protected static JMenuItem createItem(String name, Integer mnem, KeyStroke accel) { JMenuItem item = new JMenuItem(name); if (mnem != null) { item.setMnemonic(mnem.intValue()); } if (accel != null) { item.setAccelerator(accel); } return item; } }