Index:Java 2 Standard Edition (J2SE):Java 2 JDK:Swing (javax.swing.*):Top-Level Containers (JApplet, JDialog, JOptionPane, JFrame):JDialog, JOptionPane

How do I localize a JOptionPane?

Chat with random people around the world, auto-translating languages!

You can do so by changing the UI Look and Feel default values. The following text values are changeable:

This code sample is only viewable to esus.com members
Login or become a member!


You can change them by adjusting the default value in the hashtable contained in UIManager class. The program below an example. As a side note, the other default keys that are used by JOptionPane and can be customized to fit your needs are these:

This code sample is only viewable to esus.com members
Login or become a member!



Main.java:

This code sample is only viewable to esus.com members
Login or become a member!




Further Information
Author of answer: Joris Van den Bogaert

Comments
Comments to this answer are only viewable by members. Login or become a member!