GeeCON Prague 2014*
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


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)
 
GeeCON Prague 2014
 
subject: JOptionPane.showInputDialog