ConfigOptionPaneLanguage.java Source code

Java tutorial

Introduction

Here is the source code for ConfigOptionPaneLanguage.java

Source

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.UIManager;

public class ConfigOptionPaneLanguage {
    public static void main(final String[] args) {
        //  
        UIManager.put("OptionPane.cancelButtonText", "Annuler");
        UIManager.put("OptionPane.noButtonText", "Non");
        UIManager.put("OptionPane.okButtonText", "D'accord");
        UIManager.put("OptionPane.yesButtonText", "Oui");

        JFrame parent = new JFrame();

        String multiLineMsg[] = { "Hello,", "World" };
        JOptionPane.showMessageDialog(parent, multiLineMsg);
    }
}