wood burning stoves
The moose likes Swing / AWT / SWT and the fly likes JOptionPane.showInputDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane.showInputDialog" Watch "JOptionPane.showInputDialog" New topic



Joined: Jun 09, 2005
Posts: 1
i use this to popup a input dialog,and the parameters are (parentComponent,title,message,messagetype),thereinto,the messagetype parameter is JOptionPane.Question_messageType,but in the displayed dialog,the ok button and cancel button are displayed in chinese,how can i set the language of the dialog.
Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
The language on the buttons is probably set using the Locale.

Locale javadoc

So set the default before any GUI Elements are created. (In the main method)
It is sorta covered in the JavaRanch Style Guide.
subject: JOptionPane.showInputDialog
It's not a secret anymore!