Results 1 to 3 of 3
  1. #1
    talljames is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Question 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

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,233
    Rep Power
    6

    Default Re: JMenuItem with Java JRE 1.6

    Post your Short, Self Contained, Correct Example that demonstrates the problem.

  3. #3
    talljames is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default 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

Similar Threads

  1. JMenuItem Size
    By 67726e in forum AWT / Swing
    Replies: 0
    Last Post: 09-24-2010, 01:28 AM
  2. How to make a transparent JMenuItem
    By Nuclear Mosquito in forum AWT / Swing
    Replies: 2
    Last Post: 07-28-2010, 09:53 PM
  3. JMenuItem - image won't show
    By javawriter in forum AWT / Swing
    Replies: 10
    Last Post: 07-13-2010, 06:11 PM
  4. JFrame and JMenuItem
    By Kligham in forum AWT / Swing
    Replies: 10
    Last Post: 01-08-2010, 02:58 AM
  5. How to obtain the name of the JMenuItem?
    By Azuxard in forum AWT / Swing
    Replies: 1
    Last Post: 03-23-2009, 03:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •