• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMenuItem centering  RSS feed

 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've attempting to center JMenuItems in a JPopupMenu (they only have text, no icons), and I try to use the setHorizontalAlignment(SwingConstants.CENTER) method. However, the menu items end up being "centered", but they are too far to the right of the popup menu as if the popup menu should have been wider.
Anyone have any suggestions on this?
Also, as I add more and more items to the JPopupMenu, there seems to be a big blank space after the last item that gets larger as I add more items.
[ March 09, 2005: Message edited by: Eric Chang ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!