🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10321

Re: key accelerator for JMenu

#10321
From: Rich Wilkman
Date: Fri, 15 Oct 1999 00:00
98 lines
3263 bytes
Nick:

It is also available in JB3; just use awt menus instead.

-Rich

nick bhanji wrote:
> 
>  Thank you Wendy.
> 
> Just to let you know - this feature was available in Jbuilder2 Professional
> and Jbuilder2 Client/Server.
> 
> thanks again.
> 
> nick.b
> 
> Wendy Lin wrote in message <7u5les$4hi17@forums.borland.com>...
> >Short Cut Key is only for AWT menu items.
> >
> >In Swing's JMenuItem you'll need to write a little bit of code for
> >accelerators.
> >
> >Example:
> >
> >JMenutItem aboutMenuItem = new JMenuItem("About");
> >aboutMenuItem.setAccelerator(KeyStroke.getKeyStroke('A',
> >java.awt.Event.SHIFT_MASK, false));
> >
> >This sets the accelerator to shift-A.
> >
> >Another way to do a short cut is to use menomic property:
> >
> >JMenutItem aboutMenuItem = new JMenuItem("About");
> >aboutMenuItem.setMnemonic('A');
> >
> >This underlines A, I guess it is also refer to as Hot Key.
> >
> >Hope this helps.
> >
> >--Wendy
> >JBuilder QA
> >
> >
> >nick bhanji <nbhanji@home.com> wrote in message
> >news:7u5ekq$4he4@forums.borland.com...
> >> Hi,
> >>
> >> I am trying to use Key accelarator for menu items.  When I select
> >> Accelarator in the menuitem properties
> >> it comes up <none>.  I looked up in the help file which comes up as
> >follows:
> >>
> >> "
> >> Specifying keyboard shortcuts
> >>
> >> Keyboard shortcuts enable the user to perform a menu action by typing in
> a
> >> shortcut key combination. For example, a
> >> commonly used shortcut for File|Save is Ctrl+S.
> >>
> >> To specify a keyboard shortcut for a menu item,
> >>
> >> Select the menu item in the menu designer or in the component tree.
> >> In the Inspector, select the shortcut property and enter a value or
> choose
> >a
> >> key combination from the drop-down list.
> >> This list is only a subset of the valid combinations you can use.
> >>
> >> When you add a shortcut, it appears next to the menu item at runtime.
> >> "
> >>
> >> Can some one please check to make sure I am not the only one having the
> >> problem.
> >>
> >> Thanks in Advance
> >> nick.b
> >>
> >>
> >>
> >
> >

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Quality Assurance Manager
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <38075590.E77181E1@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7u5ekq$4he4@forums.borland.com> <7u5les$4hi17@forums.borland.com> <7u63ij$82313@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,df80e8f377c66df7
X-Google-Attributes: gid111d45,public
From: Rich Wilkman <rwilkman@inprise.com>
Subject: Re: key accelerator for JMenu
Date: 1999/10/15
Message-ID: <38075590.E77181E1@inprise.com>
X-Deja-AN: 537133725
Content-Transfer-Encoding: 7bit
References: <7u5ekq$4he4@forums.borland.com> <7u5les$4hi17@forums.borland.com> <7u63ij$82313@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing