• Post Reply Bookmark Topic Watch Topic
  • New Topic

JOptionPane.showInputDialog  RSS feed

 
tiger_niuniu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!