JMenuItem with Java JRE 1.6
Having an issue with the display of my jMenuItems. They appear correctly with jre 1.4(I know, really old now), but in the later version 1.6 the fomat is stuffed up. On one java application screen I have 4 menus. The first one is a "File" menu with an "Open" menu item that also has a quick key to the right of it. The space for the check box (which is required in jre 1.6) shows up ok but with no vertical break line and the "Open" word is pushed to the right over the "Cntrl O" text. The other 3 menus are having their menu items text cut off short on the right.
On another screen I have only the one menu "File" and the menu item displays correctly with the grey separator for the check box, etc. I am not using check boxes.
Has anyone come across this?
cheers.
talljames
Re: JMenuItem with Java JRE 1.6
Post your Short, Self Contained, Correct Example that demonstrates the problem.
Re: JMenuItem with Java JRE 1.6
Thanks camickr but I fixed it. Well anyway one way to fix it. I just added an icon and used the combined text and icon in the one method.
So I went from:
jMenuItem1.setText("Open"); to jMenuItem1 = new JMenuItem("Open", iconOpen);
Interesting problem.
cheers
James