wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Do mnemonics show up in Windows X P w/ Java 1.4? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Do mnemonics show up in Windows X P w/ Java 1.4?" Watch "Do mnemonics show up in Windows X P w/ Java 1.4?" New topic
Author

Do mnemonics show up in Windows X P w/ Java 1.4?

John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
I have been trying to get the little underlined characters to display in a JMenuItem using Windows XP and Java 1.4.0 with no luck. I know that you have to press Alt to make them viewable in Windows XP, but I still cannot see them. The functionality works just fine however, it's just a matter of not being able to see them.
I looked at the Bug Parade and saw some bugs related to this, but I was unclear as to whether or not they had all been fixed for the 1.4.0 release. Does anyone know for sure whether mnemonics are broken or not? Thanks...
Randy
[ March 27, 2002: Message edited by: Randy Gordon ]
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
I am also interested by the answer!


Younes
By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I don't know if it is still considered broke or not, but I am running jdk 1.4 on windows XP and my mnemonics are showing up just fine.


GenRocket - Experts at Building Test Data
John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
Hi Gregg,
Can you tell me what the output of java -version gives you? Mine is:

Also, are you seeing the mnemonics correctly in JMenuItems or some other component? Do you have to press Alt in order to see the underlined characters in the menu?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Mine is Version "1.4.0" (Build 1.4.0-b92)
If I were you I would go to java.sun.com and download the latest jdk 1.4. You seem to still be using the Release Candidate (1.4.0_rc) See if that fixes your problem.
[ March 28, 2002: Message edited by: Gregg Bolinger ]
John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
Thanks for noticing that Gregg. I have just ugraded to build 1.4.0-b92. The mnemonics still don't show up. However, I should have mentioned that they only don't show up under the Windows Look and Feel. Under the Java Look and Feel, they do show up. I'm guessing this is a Windows Look & Feel and Java 1.4 related issue...
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I changed my look and feel to windows and they still show up fine on my PC. You say you upgraded, however when you installed the JDK it doesn't actually upgrade. It just creates a new directory. I am wondering if you went through and changed all your environment variables to use the new JDK you just installed. Maybe you are still using the old one and just don't know it?? Just trying to problem solve.
John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
Okay, I'm starting to get confused. I definitely have the latest version of the SDK. "java -version" gives me

I also uninstalled the old Release Candidate version before installing this one. I'm running out of ideas as to what could be wrong. The following program does not show an underlined F or S when I run it. It makes no difference whether I press Alt or not.

Now, if I get rid of the section

I do see the underlined F and S since I'm now in the Java Look and Feel. Maybe there is some registry setting the Windows Look and Feel is looking for and can't find or is set wrong. That's a total guess though. I have no idea what's going on. Gregg, are you SURE you see underlined characters in JMenu's and JMenuItem's on Windows XP in the Windows Look and Feel? Thanks...
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Ok, funny thing. I see them in my Application that I have compiled. However when I compile and run your application they are not there, just like you said. I am looking into it a little more. I am trying to see if there is a difference between your application and mine.
John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
I would love to see an example program that shows the mnemonics actually showing up.
I'm anxiously awaiting anything you can find out. By the way, I appreciate you looking into this...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Do mnemonics show up in Windows X P w/ Java 1.4?
 
Similar Threads
Setting Mnemonics
keyboard usage of a JOptionPane
java dev enviroment
JRE 1.4.0 support on various platforms
Windows XP and JDK1.4