This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes change language JOptionPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "change language JOptionPane" Watch "change language JOptionPane" New topic

change language JOptionPane

Nouf Nassri
Ranch Hand

Joined: Apr 22, 2010
Posts: 40

I have a program entirely in English, and I post in dialogs with the methods of JOptionPane.
But I found that the buttons appear in French, so I OUI/NON or OK/ANNULER instead of YES / NO and OK / CANCEL.

Rob Spoor

Joined: Oct 27, 2005
Posts: 19649

You can switch your entire Locale to English by calling Locale.setDefault(Locale.ENGLISH) at the start of your application. Please note that this also affects date/time and number parsing and formatting.

How To Ask Questions How To Answer Questions
Nouf Nassri
Ranch Hand

Joined: Apr 22, 2010
Posts: 40
thank you for your reply but the language does not change
I agree. Here's the link:
subject: change language JOptionPane
Similar Threads
java alert
JTable: (TableModel) How to use the Object Array
Text files with arabic charcaters
JInternalFrame vs JDialog
Making JOptionPane disappear after Ok is pressed