• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to do an international JoptionPane.showMessageDialog

 
Jeff Chang
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I try to do an international JoptionPane.showMessageDialog (i.e., the language for the text such as OK, NO, Cancel, etc.,
of the buttons on which can be changed). Does anybody know how to do this? Thanks.
Jeff
 
Renee Zhang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The examples are <html><body>here </body></html>
 
Wilfried LAURENT
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would rather say that the examples of internalization are here:
http://java.sun.com/docs/books/tutorial/i18n/index.html
 
Jeff Chang
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much. :-)
 
Gergo Csaki
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could You please explain how to do the same but using a Locale that is not in the base jre? I need a Locale("hu","HU") for Hungarian button labels...
I tried to figure out but I'm completely lost. Do I need to create a new class that extends ResourceBundle? Or should I use a properties file? No clue...

Thx in advance,
Brian
[ October 03, 2005: Message edited by: Brian Twodoor ]
 
Gergo Csaki
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got one possible solution:

UIManager.put("OptionPane.yesButtonText", "Igen");

Not really elegant but it works.

However, still waiting for alternatives...

Thanks,
Brian
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!