File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Internationalize JOptionPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Internationalize JOptionPane" Watch "Internationalize JOptionPane" New topic
Author

Internationalize JOptionPane

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
Please tell me how to internationalize the buttons in JoptionPane.

Thanks for your help,

Alejandro Barrero


Your help will be greatly appreciated,
Alejandro Barrero
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19653
    
  18

Check out this method:
public static int showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) throws HeadlessException

With this method, you can specify just about everything for your option dialog. It will create a button for each element in "options", with the button for "initialValue" being the default button. If you use Strings you will be fine.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Even quicker...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
wood burning stoves
 
subject: Internationalize JOptionPane
 
Similar Threads
[B]How To Center/Position a showMessageDialog box?[/B]
Message Dialog box --> action performed.
java alert
To authors
actions performed