CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    May 2016
    Posts
    1

    Java Swing JMenu's icon is not placed properly inside the menu

    I add only an icon to my JMenu.

    If I use setPreferredSize(size of the icon) on JMenu, my icon is shifted to right in the JMenu.

    If I use setSize(size of the icon) on JMenu, my icon is placed in center in the JMenu but has gaps on both sides.

    Is there a way to align my icon properly or to expand so that its fills the menu space?

    I can share my code snippets if required. Pic is attached.

    Thanks
    Attached Images Attached Images  

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured