< prev index next >
src/java.desktop/share/classes/javax/swing/JMenuBar.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -389,19 +389,19 @@
/**
* Implemented to be a <code>MenuElement</code> -- does nothing.
*
* @see #getSubElements
*/
- public void processMouseEvent(MouseEvent event,MenuElement path[],MenuSelectionManager manager) {
+ public void processMouseEvent(MouseEvent event,MenuElement[] path,MenuSelectionManager manager) {
}
/**
* Implemented to be a <code>MenuElement</code> -- does nothing.
*
* @see #getSubElements
*/
- public void processKeyEvent(KeyEvent e,MenuElement path[],MenuSelectionManager manager) {
+ public void processKeyEvent(KeyEvent e,MenuElement[] path,MenuSelectionManager manager) {
}
/**
* Implemented to be a <code>MenuElement</code> -- does nothing.
*
@@ -418,11 +418,11 @@
* other menu elements.
* @return an array of menu items in the menu bar.
*/
@BeanProperty(bound = false)
public MenuElement[] getSubElements() {
- MenuElement result[];
+ MenuElement[] result;
Vector<MenuElement> tmp = new Vector<MenuElement>();
int c = getComponentCount();
int i;
Component m;
@@ -608,11 +608,11 @@
}
// now popup the new menu
getSelectionModel().setSelectedIndex(i);
JMenu menu = getMenu(i);
if (menu != null) {
- MenuElement me[] = new MenuElement[3];
+ MenuElement[] me = new MenuElement[3];
me[0] = JMenuBar.this;
me[1] = menu;
me[2] = menu.getPopupMenu();
MenuSelectionManager.defaultManager().setSelectedPath(me);
// menu.setPopupMenuVisible(true);
< prev index next >