File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes swing mnemonic Problem not display at windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swing mnemonic Problem not display at windows" Watch "swing mnemonic Problem not display at windows" New topic
Author

swing mnemonic Problem not display at windows

Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684


Hi All,

I am working on Swing. I have problem to see swing mnemonic at my Menu and button. I read many foruma they said this is windows problem. Please help me how to resolve this issue without changing windows setting.


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2153
    
    7
Please help me how to resolve this issue without changing windows setting.


Its a windows settting. If you don't want to change the windows setting, then don't use the Windows LAF. The Metal LAF works fine.
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

No, I can not change my look and feel... is there any other solution ??
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

Until you TellTheDetails we won't be able to help you.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

Hi,

I am using

to set our all swing base windows look and feel, But the thing is we have already set mnemonic to all our windows menu and some of buttons also. But I am unable to find mnemonic at my menu and button.

If I change windows setting then I got the solution but I don't want that solution. Let me know if your want more clarification on this.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you could try html, but sounds like it'll be a lot of modification work, if you have many

JMenuItem open = new JMenuItem("Open");
becomes
JMenuItem open = new JMenuItem("<html>Open</html>");

[EDIT]
OK, that posting attempt failed
supposed to read
"html tag~underline tag~O~close underline tag~pen~close html tag"
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

Are you using WinXP?
If yes, there is a setting somewhere which allows you to show/hide the mnemonics.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2153
    
    7
If I change windows setting then I got the solution but I don't want that solution.


The reason its a Windows setting is because eash user can choose what they like.

If a user likes to see the mnemonic then they can change the Window setting, because it takes effect for all applications not just the one you write.

If a user doesn't like the mnemonic then they leave it as is.

You should NOT force your preferences on every user!
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

yes, I am using XP but my requirement all the user able to show the mnemonic without changing XP settings.. ... so give me solution if it is possible...

Please let me know if it is possible...
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

Michael Dunn wrote:you could try html, but sounds like it'll be a lot of modification work, if you have many

JMenuItem open = new JMenuItem("Open");
becomes
JMenuItem open = new JMenuItem("<html>Open</html>");

[EDIT]
OK, that posting attempt failed
supposed to read
"html tag~underline tag~O~close underline tag~pen~close html tag"


yes, but my poupose to show underline solve with HTML but what about user press Alt+mnemonic key . How can I set this ?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> but what about use press Alt+mnemonic key . How can I set this ?

how would you do it if not windows L&F?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: swing mnemonic Problem not display at windows
 
Similar Threads
Apple Command Key
Mnemonic to Button in Windows look and feel
what is the value of 8 | 9 & 10 ^ 11 ?
problem with mnemonics
NX: mnemonics problem in windows XP