Here you can find the source of setFontsToMenu(MenuElement menuElement, Font font)
static public void setFontsToMenu(MenuElement menuElement, Font font)
//package com.java2s; import java.awt.Font; import javax.swing.MenuElement; public class Main { static public void setFontsToMenu(MenuElement menuElement, Font font) { MenuElement[] subElements = menuElement.getSubElements(); menuElement.getComponent().setFont(font); menuElement.getComponent().invalidate(); if (subElements == null) return; for (int i = 0; i < subElements.length; i++) setFontsToMenu(subElements[i], font); }/*from w w w . j a va 2 s . co m*/ }