Java Tutorial/Swing/Custom Menu
Creating Custom MenuElement Components: The MenuElement Interface
public interface MenuElement {
public Component getComponent();
public MenuElement[] getSubElements();
public void menuSelectionChanged(boolean isInclude);
public void processKeyEvent(KeyEvent event, MenuElement path[], MenuSelectionManager mgr);
public void processMouseEvent(MouseEvent event, MenuElement path[], MenuSelectionManager mgr);
}