- // Using non-deprecated Extended key mask modifiers, but Java 8 has no
- // getMenuShortcutKeyMaskEx method
- Toolkit tk = Toolkit.getDefaultToolkit();
- Method method = null;
- try
- {
- method = tk.getClass().getMethod("getMenuShortcutKeyMaskEx");
- } catch (NoSuchMethodException e)
- {
- System.err.println(
- "Could not find Toolkit method getMenuShortcutKeyMaskEx. Trying getMenuShortcutKeyMask.");
- }
- if (method == null)