menu.addSeparator();
JMenu submenu = (JMenu) menu.add(new JMenu(mxResources.get("align")));
submenu.add(editor.bind(mxResources.get("left"), new AlignCellsAction(
mxConstants.ALIGN_LEFT),
"/com/mxgraph/examples/swing/images/alignleft.gif"));
submenu.add(editor.bind(mxResources.get("center"),
new AlignCellsAction(mxConstants.ALIGN_CENTER),
"/com/mxgraph/examples/swing/images/aligncenter.gif"));
submenu.add(editor.bind(mxResources.get("right"), new AlignCellsAction(
mxConstants.ALIGN_RIGHT),
"/com/mxgraph/examples/swing/images/alignright.gif"));
submenu.addSeparator();
submenu.add(editor.bind(mxResources.get("top"), new AlignCellsAction(
mxConstants.ALIGN_TOP),
"/com/mxgraph/examples/swing/images/aligntop.gif"));
submenu.add(editor.bind(mxResources.get("middle"),
new AlignCellsAction(mxConstants.ALIGN_MIDDLE),
"/com/mxgraph/examples/swing/images/alignmiddle.gif"));
submenu.add(editor.bind(mxResources.get("bottom"),
new AlignCellsAction(mxConstants.ALIGN_BOTTOM),
"/com/mxgraph/examples/swing/images/alignbottom.gif"));
menu.addSeparator();
menu