Saturday, April 26, 2008

Changing the swing submenu expanding orientation

To set the orientation of the menu to open the submenus in the left direction ( <-- ) instead of default right direction ( --> ) use :
JMenu prefMenu = new JMenu();
prefMenu.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

No comments:

Post a Comment