Search code examples
javanetbeansnetbeans-7jmenuitemlaunch4j

JMenuItem overlapping with mnemonic in exe


I'm using Netbeans 7.0.1. I have the problem that JMenuItems and their mnemonics seem crammed.

On running, the JMenuItem and the mnemonic are spaced normally. After creating an .exe using launch4j the mnemonics overlap the JMenuItem.

Here's the screenshot:

File Edit About

Only the setAccelerator() function has suffered this disfiguration. DefaultEditorKit.action in the Edit menu looks alright or maybe it's because of the checkbox.

How do I get around this?


Solution

  • I figured it out after a bit of research. It was a bug in java versions 5.0 & 6 (Bug ID: JDK-6385366). It was resolved in version 6(b80). I used launch4j and Inno Setup to bundle jre6. Bundling the jar with a later version fixed the issue. jre8 works swimmingly.