aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JMenuItems tricks for displaying short cut text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenuItems tricks for displaying short cut text" Watch "JMenuItems tricks for displaying short cut text" New topic
Author

JMenuItems tricks for displaying short cut text

Bill White
Ranch Hand

Joined: Oct 27, 2002
Posts: 82
example
Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
I cant get the short cut text to line up neatly. Just placing spaces doesnt work. And ideas here?
What I am getting is:
Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Not too sure how you are trying to add the accelorator keystroke to the JMenuItem but here is the way you should be doing it.


GenRocket - A Test Data Generation Platform
Bill White
Ranch Hand

Joined: Oct 27, 2002
Posts: 82
Gregg,
Thanks for the reply.
I will be honest I didn't follow you at first but after I actually RTFM'd. I saw exactly what you meant.
Thanks a bunch!!!
[ March 17, 2003: Message edited by: Bill May Jr ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JMenuItems tricks for displaying short cut text
 
Similar Threads
Cut Copy Paste n SelectAll in JTextPane
Need to restrict ctrl+c, ctrl+v, ctrl+x
special chars generated during paste/copy
How to enable CTRL+C to perform action instead of coping to clipboard?
disabling windows paste for text components