Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5150

Re: Where is the actual menu key processing in Swing or the LaF?

From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.gui
Subject Re: Where is the actual menu key processing in Swing or the LaF?
Date 2012-05-27 19:11 -0400
Organization A noiseless patient Spider
Message-ID <jpucc7$ch6$1@dont-email.me> (permalink)
References <menu-20120525135656@ram.dialup.fu-berlin.de> <jpo4aq$ngr$1@dont-email.me> <menu-20120525181856@ram.dialup.fu-berlin.de> <jpu8sm$qpj$1@dont-email.me> <overwriting-20120528003801@ram.dialup.fu-berlin.de>

Show all headers | View raw


On 05/27/2012 06:52 PM, Stefan Ram wrote:
> Jeff Higgins<jeff@invalid.invalid>  writes:
>> After a good bit of reading on the subject since your post, I find your
>> statement: "»Overwriting« something in a LaF also is not obvious"
>> remarkably mild.
>
>    I did accomplish it in the end by overwriting
>
> processKeyEvent
> ( final java.awt.event.KeyEvent keyEvent,
>    final javax.swing.MenuElement menuElement[],
>    final javax.swing.MenuSelectionManager menuSelectionManager )
>
>    in JMenu, using
>
> javax.swing.MenuSelectionManager.defaultManager().setSelectedPath( javax.swing.MenuElement[] )
>
>    to adjust the menu path.
>
So now you use ram.stephan.JMenu in place of javax.swing.JMenu?

import javax.swing.JFrame;
//import javax.swing.JMenu;
import ram.stephan.JMenu
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

Maybe I'm tipsy. I thought the whole idea was to replace the "feel" 
rather than the component.

Sigh, back to the watermelon.

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-25 10:18 -0400
  Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 18:12 -0400
    Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 19:11 -0400
      Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 19:33 -0400
      Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 21:20 -0400

csiph-web