permaculture playing cards*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane.showInputDialog" Watch "JOptionPane.showInputDialog" New topic
Author

JOptionPane.showInputDialog

tiger_niuniu
Greenhorn

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
 
Similar Threads
Modal dialogs
Please help - setMnemonic
Internationalize JOptionPane
Regarding JTextField
How to display alert box at the top of all frames ?