diff --git a/app/src/processing/app/ui/Toolkit.java b/app/src/processing/app/ui/Toolkit.java index fef72f712..f1cbf56dc 100644 --- a/app/src/processing/app/ui/Toolkit.java +++ b/app/src/processing/app/ui/Toolkit.java @@ -501,6 +501,18 @@ public class Toolkit { } + static public int getMenuItemIndex(JMenu menu, JMenuItem item) { + int index = 0; + for (Component comp : menu.getMenuComponents()) { + if (comp == item) { + return index; + } + index++; + } + return -1; + } + + // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -1135,16 +1147,4 @@ public class Toolkit { //return new TextLayout("H", font, frc).getBounds().getHeight(); return new TextLayout("H", g.getFont(), frc).getBounds().getHeight(); } - - - static public int getMenuItemIndex(JMenu menu, JMenuItem item) { - int index = 0; - for (Component comp : menu.getMenuComponents()) { - if (comp == item) { - return index; - } - index++; - } - return -1; - } }