Trying to make Java menu items that look like the following:
Code:
New...
Open... Enter
Move... F7
Copy... F8
etc., but the problem I am having is that when I use "\t" in the code, the tabs don't show up in the menu when I actually run the program. My output looks like the following:
New...
Open...Enter
Move...F7
Copy...F8
I tried spaces instead, and that works, but it looks really sloppy.
Here is an example of my code:
JMenuItem moveItem = new JMenuItem("Move...\t\t\tF7");
moveItem.setMnemonic('M');
fileMenu.add(moveItem);
Does anybody know how to make "\t" work?