Here you can find the source of useCheckAndArrow(JMenuItem menuItem)
private static boolean useCheckAndArrow(JMenuItem menuItem)
//package com.java2s; import javax.swing.JMenu; import javax.swing.JMenuItem; public class Main { private static boolean useCheckAndArrow(JMenuItem menuItem) { boolean b = true; if ((menuItem instanceof JMenu) && (((JMenu) menuItem).isTopLevelMenu())) { b = false;/*from ww w . j a v a 2 s. c o m*/ } return b; } }