Method getMenuComponentCount()
Return type: int
Member of:
javax.swing.JMenu
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
if ((menu.getMenuComponentCount() >= 0) && (menu.getMenuComponentCount() <= 9)) {
2
int n = menu.getMenuComponentCount();
3
moveToGroupMenu.setEnabled(moveToGroupMenu.getMenuComponentCount() > 0);
4
for (int i = 0; i < fileMenu.getMenuComponentCount(); i++) {
5
assertEquals("Submenu should contain two elements", 2, jm.getMenuComponentCount());
6
for (int i = 0; i < fileMenu.getMenuComponentCount(); i++) {
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.