Article View: borland.public.jbuilder.java.swing
Article #8827Bug in javax.swing.JMenuItem? (JDK1.3)
From: Trejkaz Xaoza
Date: Mon, 17 Jul 2000 00:00
Date: Mon, 17 Jul 2000 00:00
22 lines
1345 bytes
1345 bytes
In javax.swing.Action, there was the addition of at least two new constants: Action.ACCELERATOR_KEY Action.MNEMONIC_KEY The documentation implies that these keys be used in preference to manually calling setMnemonic and setAccelerator in JMenuItem (though I'm not sure whether this is really the case -- help me out here please.) However, when I add an Action object which uses these new keys to a JMenu via the add(Action) method, the graphical representation of the menu item lacks the blue accelerator text it usually shows (Metal L&F), the underlined mnemonic key isn't displayed, and the shortcut on the action doesn't work. This is bad karma, as it means I might have to manually use setMnemonic and setAccelerator still. :-( Is there any other way around this? Is it expected behaviour, even?
Technical Details
Message-ID:
<3972ABBA.20C593A4@xaoza.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3e6ab9b3bc84a355,start X-Google-Attributes: gid111d45,public From: Trejkaz Xaoza <trejkaz@xaoza.net> Subject: Bug in javax.swing.JMenuItem? (JDK1.3) Date: 2000/07/17 Message-ID: <3972ABBA.20C593A4@xaoza.net> X-Deja-AN: 647231672 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 16 Jul 2000 23:36:58 -0800, 127.0.0.1 MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing