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
Forum Rules