JMenu/JMenuItem L&F Between Vista and XP

J

Jason Cavett

I have been having an issue with JMenus L&F between Vista and XP.

In XP, it seems as though ALL menus get a border (16 pixels wide) on
the left hand side of the menu. Originally, I thought this was the
position for the icon, but, if I put an icon into the menu, it shifts
the text ANOTHER 16 pixels for the icon, resulting in a very wide
border. Additionally, the if the next JMenuItem does not have an
icon, it does not line up with the JMenuItem's text above it.

In Vista, however, it works as I expect - there's a 16 pixel wide
border, and if you place an icon in the JMenuItem, the icon is placed
in that border area.

What I am wondering, is, how do I get Windows XP menus to act the same
way as the Vista menus. I tried using insets to shift the JMenuItem
to the left, but then that screwed up the Vista menus.


Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top