Skip to main content

Internationalization, ComponentOrientation and right-to-left

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
jbowie
Offline
Joined: 2012-10-01

Am internationalizing a fairly large Swing application. Done all the ResourceBundle work and next tried right-to-left orientation. I had expected that simply setting the Locale from the command line (via JVM arguments) would propagate to all instantiated components, but this doesn't appear to be the case. My default Locale is correct (iw_IL in my test case) but layouts such as GridBag don't respect the default. Tried explicitly setting the default in my main, and then also using applyComponentOrientation to my parent JFrame, but this doesn't work either. Applying to a specific JPanel does work (for the GridBag layout) but this doesn't affect child components such as ComboBoxes. I shudder to think I need to apply to every instantiated component in my app. Am I missing something?

Jack