Alt+mnemonic key is not working properly for Menu Items

Assume there are two menus , File Menu with mnemonic Alt+F
and Save Menu with mnemonic Alt+S. File Menu contains the
menu items like PageSetup with Mnemonic S. Save menu has
the menu item Properties with Mnemonic P.
Pressing Alt+F opens the File Menu which has the menu item
PageSetup.Pressing S activates the PageSetup menu item.
Similarly Pressing Alt+S opens the Save Menu which has the
menu item Properties. Pressing P activates the Properties
menu item acion. But Pressing Alt+P also activates the
Properties menu item action(it is not the desired behaviour)
Pressing Alt+Mnemonic key has to open only the Menus.It
should not consider the menu items.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Press Alt+F
2.File Menu is invoked
3.Press S
4. Invokes the menu item action
5. Press Alt+S
6. Save menu is invoked
7. Press P
8. Invokes the menu item action
9. Press Alt+P
10. Invokes the menu item action
EXPECTED VERSUS ACTUAL BEHAVIOR :
Pressing of Alt+Mnemonic key invokes the menu and also menu
item actions. If the same mnemonic is present in the Menu
it is giving the priority to Menu only.Pressing of Alt key
alone does not hiding the pull down menu
Expected Result;
Pressing of Alt+Mnemonic key has to list out the pull
down menu only.It should not consider the menu items with
the same mnemonic. If Alt key alone is pressed the pull
down menu has to hide.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JavaBug extends JFrame
public JavaBug()
// Create menu bar
JMenuBar menuBar = new JMenuBar(); // Create menu bar
setJMenuBar(menuBar); // Add menu bar to window
// Create first option on menuBar
JMenu m1 = new JMenu("File");
m1.setMnemonic('F');
JMenuItem m1o1 = new JMenuItem("PageSetup");
m1o1.setMnemonic('S');
m1o1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("File/PageSetup was selected");
m1.add(m1o1);
// Create second option on menuBar
JMenu m2 = new JMenu("Save");
m2.setMnemonic('S');
JMenuItem m2o1 = new JMenuItem("Properties");
m2o1.setMnemonic('P');
m2o1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Save/Properties was selected");
m2.add(m2o1);
menuBar.add(m1);
menuBar.add(m2);
this.setTitle("Mnemonic Bugs");
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
setSize(400,250);
show();
public static void main(String[] args)
JavaBug bug = new JavaBug();
Suggestions welcomed
punniya

I tried your code, but didn't get your "bug" using jdk 1.3 on windows 2000 (at my school).
Kind regards,
Levi

Similar Messages

  • Always Script Editor ... Alt Gr key does not work

    Hi,
    With IE6 in SQL Script Editor
    Alt Gr Key does not work.
    For instance, I cannot type ||
    In fact it's a copy-paste from SQL command (which works well)
    Note Script Editor does not work with Firefox.
    Thank you for any information
    Regards
    JRD120

    You might try this:
    Remove any USB device except mouse/keyboard
    Perform a PRAM-reset (hold ALT-CMD-P-R until you've heard the starting chime 3 times)

  • I am facing problem in playing yahoo pool in Firefox 4 while it was working fine in Firefox 3.6. In Firefox 4 the combination of mouse keys are not working properly.

    I am facing problem in playing yahoo pool in Firefox 4 while it was working fine in Firefox 3.6. In Firefox 4 the combination of mouse keys are not working properly.

    I updated to Firefox 4.01 today and the middle scroll button on my Lenovo T400 stopped working. I downloaded the updated Ultranav utility and the Ultranav driver for my T400 from here http://www-307.ibm.com/pc/support/site.wss/MIGR-72858.html and then uninstalled the "Thinkpad Ultranav Driver" from Add/Remove programs rebooted and then installed the updated utility and driver (another reboot) and it now works perfectly.
    So glad to get this working again.

  • Lumia 720z vol down key izz not working properly

    Frm last few ,my fone vol down key izz not working properly,i tried my best but getting no good result

    Since purchase i have been visiting Nokia Care 3 times for the same Volume key issue.
    No satisfactory solution keeps on occuring now again same issue.Care personel says use it this time n will see got irritate with such replies Nokia Plz respond Act on this issue.
    jimmyireland wrote:
    Have you tried rebooting the device or trying a hard reset?
    The hard reset will wipe all your data.
    To do this-Go to - Settings-About-Reset your phone.
    If this fails return device to point of purchase or a nokia care center.

  • Left and right arrow keys are not working properly now

    I searched the forum and didn't see this posted. My left and right arrow keys are not working properly now.
    For example, when typing, left arrow does not produce the desired action (move cursor one spot to the left), and right arrow does not produce the desired action (move cursor one spot to the right). Also, control + left no longer activates spaces, and control + right no longer activates spaces.
    Interestingly, in investigating the problem, I noticed that my shortcut keys for activating spaces and for activating expose had been changed (software update?). Before, I had set F5 (without pressing fn) for expose and had set F6 (without pressing fn) for spaces. Now, I noticed spaces was set back to the default of F8 (requiring fn).
    The issue persists after shut down, and even when logged on to other users, e.g. Guest.
    All other keys seem to be working fine, including the up and down arrows.
    I don't think it's a cleaning issue because fn + left + right produces the "[" character on the screen.
    Any ideas?

    I'm having the same type of issue on my MacBook except not with arrow keys. The volume keys do different things when I click on them. For example, the mute key brings up the dashboard and the volume up key makes all the open screens smaller (don't know what this feature is called). I did a software update then restarted the computer when this starting happening. Any help would be greatly appreciated, thanks.

  • I have a iMac running on an iMac and the F operation keys are not working properly.

    My new iMac bluetooth keyboard is having issues all of the F operation keys are not working exept for F12 witch is supposed to be volume up takes me to mission control. I went into system prefrences and there was no setting in keyboard for the volume keys there are some settings for the operation keys but they are all checked and they are still not working and the settings that are checked arn't even what the keys are supposed to do. Please help.

    SMC RESET
    http://support.apple.com/kb/HT3964
    Shut down the computer.
    Unplug the computer's power cord and ALL peripherals.
    Wait 15 seconds.
    Attach the computers power cable.
    Wait another 5 seconds and press the power button to turn on the computer.
    The 5 second timing is important to a successful reset.
    PRAM RESET
    Zap the PRAM
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • Home, end, av pag and re pag keys are not working properly

    Home, end, av pag, re pag and directional keys are not working properly. Home key instead of going to the beginning of the page, it goes to the end, and av pag, re pag and the directional keys are working only when te cursor is in 'text mode' like if going to write. the problem appears after refreshing to the last version.

    Try hitting '''F7'''.
    http://kb.mozillazine.org/Accessibility.browsewithcaret

  • Touch pad not working properly for iphone 4s

    touch pad not working properly for iphone 4s. Few letters are not working at all and my phone ios slowly loosing touch sensitivity. I lost my phone and got the new phone 10 months back.

    Try here >  iPhone:  Troubleshooting touchscreen response
    Also go to settings>general>reset>rest all settings phone will turn off and turn on by itself
    Once the phone is press and hold the home and power button at the same time wait for the apple sign then release the buttons phone will turn off and on.
    Update the software of your iphone or restore the phone to its factory settings

  • Some keys are not working properly

    Hello,
    This is my first time having to come on and ask for help. This morning I cleaned the screen and keyboard on my HP Envy laptop while it was turned off. After, the keys wouldn't work properly. The caps key won't work, and some of the keys won't work at all. So, I refreshed and thought that would help set things back in order. But, now Microsoft is asking me to sign in and I can't because the keys don't work properly. Also, I think I made a mistake in refreshing the laptop because now the my finger print won't work with the simple pass on the keyboard. How can I fix this?
    Look forward to hearing from anyone who has had this issue, and has a solution.
    Thank you,
    Maureen

    Please check and verify if an External Keyboard works fine with your Notebook. If Yes, please perform the below
    shown troubleshooting steps
    Step 01. Click on the Start Button and go to Control Panel
    Step 02. Open the Device Manager and expand the Keyboard from the list
    Step 03. Right click on Standard PS/2 Keyboard and click on Uninstall
    Note: This driver will get installed again automatically on your Notebook
    Step 04. Please turn OFF the Notebook
    Step 05. Un-plug the Power/AC Adapter and also remove the Battery too
    Step 06. Press and Hold the Power Button of the Notebook for a full minute
    Step 07. Now let's re-insert the battery back in and plug back the Power/AC Adapter
    Step 08. Start the Notebook and keep tapping F10 Key during the startup to access the BIOS
    Step 09. Once you get to the BIOS, Please press F9 or F5 Key[Model specific] to load setup defaults for the BIOS
    Step 10. Use the arrow keys to say "YES" and hit enter
    Step 11. Now let's press Esc/Escape Key. Save Changes and Exit - Yes
    Step 11. Now please wait till the Unit loads the Windows Operating system
    Note: Please click on the below shown link to find more troubleshooting steps
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03738933&tmp_task=solveCategory&cc=us&dlc=en&lc...
    Hope this helps, for any further queries reply to the post and feel free to join us again
    **Click the KUDOS star on left to say Thanks**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    Thank You,
    K N R K
    Although I am an HP employee, I am speaking for myself and not for HP

  • Hello, how much did you pay when some parts of the keyboard keys are not working properly due to accidental spilt of tea?

    I accidentally spilt a tea on the keyboard of my Macbook Air 11'. I managed to wipe the keyboard and saved my laptop. However, I noticed that the Spacebar, Shift and Command keys are not working as it should be. It's like something's stuck inside that makes these keys hard to press as usual. I refered this problem to Amsys, Berwick St London, as the reservations in Apple Stores are full. Do you have any idea how much is the cost for diagnosis and repair if ever?
    Please help.

    if you spilled a good bit of tea, its a serious problem, yes.
    it got inside, and will corode, and bad things will begin to happen.
    Liquid spills, why your MacBook chassis is a one-way valve for spills
    After a substantial spill many people will turn their notebook upside down and shake it, not only does this not work, but it spreads liquid havoc throughout your machine and makes things often as bad as possible.
    The keyboard itself acts like a one way valve in the case of a substantial liquid spill. While liquid pours into the bottom chassis easy, it does not come out easily at all, and in the case of any spill, most of it will not come out by turning it upside down. Disconnect all power and contact Apple for diagnostics and repair.
    Do not attempt to, after a spill, ‘dry out your MacBook’ and test it
    After a spill most people invariably try to “dry out” their notebook by various methods, including hair dryers and otherwise. This both does not work, and after a substantial spill of any magnitude, even if the liquid was water, residue is left behind.
    There are additionally many very tight places inside your notebook where liquids will linger for a very long time, and cause corrosion or worse.
    Immediately unplug your notebook and contact Apple for in shop diagnostics and parts replacement.
    In the case of very minor spills people will “dry out” their notebook and feel success that their notebook is working ok, however invariably in nearly all instances after 4-14 days an error / fault pops up and is usually followed by more.
    In case of a spill, damage estimates are impossible,.....anything can be fixed, without question.......the question is cost.
    contact Apple for in shop diagnostics and cost estimation ....possible parts replacement.  

  • Java Script Code not working properly for visios in sharepoint 2013

    Hi all ,
                 I have few visios and I am using the visio web part to display and to redirect from one visio to other visio I am using the java script code through content editor web part . 
    In share point 2010 it's working fine , I was able to redirect to all the visios and code is working fine .
    In share point 2013 its not the same , Its not working properly . only for the first time the code is working fine . once it goes to next visio the code stops working . 
    For example if i click in visio A it gets redirect to Visio B and its stops working , it wont allow to do any other steps . 
    I have checked with the URL its correct , I am not able to find any error also .
    Indresh

    This will be likely caused by the Minimal Download Strategy not registering the Javascript on the page reload. You can turn off the MDS feature to test this.
    You can either turn off MDS in your site, or register your Javascript functions with MDS to ensure they are called. To do this, you'll need all of your code to be wrapped in a javascript file (Embed this on the page using a <script> tag and
    inside that file in a function, which you then register with MDS as follows (I usually do this in the first line of the javascript file):-
    RegisterModuleInit("/SiteAssets/YourJavaScriptFile.js", NameOfYourFunction);
    Regards
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • ITunes LP Bionic not working properly for iTunes

    Christina Aguilera's new iTunes LP Bionic does not work properly on iTunes 9.1.1 on my MacBook Pro 13" running Snow Leopard on 64-bit mode.
    It does work properly on iTunes on Windows 7 64-bit.
    This is how it does not work properly: It does not automatically refresh the display content when I have clicked on a menu item. It only refreshes the display when I move the scroll bars along the display borders, thus invalidating certain region of the display content making the LP to redraw the display. As a result clicking on the menu items, such as Photos, Song List, Credits, and Discography, etc., do not have immediate effect. Needless to say it does not work at all in full screen mode as there is nothing that can be done to invalidate the display and get the LP to redraw.
    Again it works properly on iTunes on Windows 7 64-bit so I would say it's an iTunes on Mac issue.

    I actually am on a Dell running Windows 7 and am having issues downloading the iTunes LP from the store. It's in my downloads saved, but I'm getting a message saying: "Christina Aguilera Bionic (Deluxe Edition) iTunes LP was not downloaded. You do not have enough access privileges for this operation." Any ideas? It seems as though I'm having the opposite problem as most of you.

  • Next-Previous Do not work Properly for lengthly dynamic Where Clause

    I have created a View object using Expert Query mode
    with following Query:
    SELECT LIC_SYS_ID,
    LIC_NAME,
    TERRITORIES,
    LANGUAGES,
    MEDIA,
    SEGMENT_NAME,
    CHANNELS,
    ACTIVITY_CD,
    LS.LIC_SHORT_NAME,
    LS.LIC_AKA_NAME
    FROM V_LICENSEE_SEARCH LS
    ORDER BY LIC_NAME
    Then at run time the following Where Clause staments get added by in JSP based on the users criteria
    wClause = "(ACTIVITY_CD = '" + activityStatus + "')"
    + " AND " +
    "(LIC_NAME like '" + licenseeName + "%' OR " +
    " LIC_SHORT_NAME like '" + licenseeName + "%' OR " +
    " LIC_AKA_NAME like '" + licenseeName + "%' ) "
    In this case the DataScroller does not work properly It DataTable traves only one setp when I click the "Next" link, But if I use the Drop down list of the Scroller its works fine.
    Secondly the "Next" "Previous" links of the DataScroller work fine if I use only one stmt in the WhereClause ex: "ACTIVITY_CD LIKE 'A%'".
    Can anybody help me with this, Is this a limitation of DataScroller/DataTable/DataSource tags why does it not work??
    Please help me its urgent.
    Thanks a ton !!

    Thx for the reply, I did try your suggestion It did not throw any exception. Here is the log messages after enabling jbo Debug.
    [391] Reusing a cached session application module instance
    [392] Getting a connection for internal use...
    [393] Creating internal connection...
    [394] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    wClause : (ACTIVITY_CD = 'A') AND (LIC_NAME like 'A%' OR LIC_SHORT_NAME like 'A%' OR LIC_AKA_NAME like 'A%' )
    [395] Column count: 10
    [396] ViewObject : Reusing defined prepared Statement
    [397] $$added root$$ id=-2
    [398] Application Module failover is enabled
    [399] Getting a connection for internal use...
    [400] Creating internal connection...
    [401] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    [402] <AM MomVer="0">
    <cd/>
    <VO>
    <VO Sz="8" St="8" Def="com.sophoi.ipls.media.tv.businessentities.licensee.LicenseeView" Name="licenseeView">
    <Wh>
    <![CDATA[(ACTIVITY_CD = 'A') AND (LIC_NAME like 'A%' OR  LIC_SHORT_NAME like 'A%' OR  LIC_AKA_NAME  like 'A%' )]]>
    </Wh>
    <Or>
    <![CDATA[LIC_NAME ASC]]>
    </Or>
    </VO>
    </VO>
    </AM>Long postings are being truncated to ~1 kB at this time.

  • Power button not working properly for iphone 5. Warranty expired on 22 nov 2013 what to do?

    Hi,
    Power button not functioning properly for my iphone 5. Kindly give advice on what to do. Its warranty expired on 22nd november 2013.

    Read here:
    https://ssl.apple.com/support/iphone5-sleepwakebutton/

  • Alt Gr + key combination not working in FF?

    When i wont to type for example "@" i cant because in FF combination of Alt Gr key and V are not working.
    Why the combination is not working and how i can fix that?

    I had the same problem, in my case the problem was the Firewall (COMODO). I set the Firefox program without permission to access to the keyboard, the most of keys worked perfectly but ALTGR+Any didn't work. Try to allow access to the keyboard to firefox program if you has any firewall with proactive defense.
    I hope this solve your problem.
    Regards,
    Blackmoon

Maybe you are looking for

  • Error while transporting into qty

    dear all, Am facing the followingproblem while importing Developed  objects into qty, am facing the folowing error, am impoting Infoarea,infoabject catalog infoobject collected in one request datasource,Ipac, transformation ,DTP and its aplication co

  • Counter not working

    I'm trying to count the number of categories in my database. The problem is that my Counter "Count" is always returning zero but I have check ths database and there are a few different categories String theSQL = "Select category From Archive"; int Co

  • Downloading Raw Images

    Hi there I am using Adode Photoshop Starter edition 3.0 to download photos from my Minolta A200 onto my laptop using a card reader. I don't have any problems apart from when I have Raw files on the card. It will download all the files and ignore the

  • Prorated Charges are UNACCEPTABLE!!!!

    I had a smart phone plan with 450 minutes and 4 GB of data with unlimited texting for a while.  Last month I downgraded to a standard phone plan with 450 minutes, no texting and 75 MB of data.  I only used a total of about 320 minutes last month but

  • Remote login through a web service

    Can you set up a login process in a CFC so it can be used remotely through a web service? I would like to have my members be able to have their clients login to a section of my web site through their own web site. Is there anyplace I can find an exam