1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
import java.util.*;
import java.awt.*;
import javax.swing.*;
public class TestIntl {
public static void main(String[] args) {
try {
ResourceBundle resource = ResourceBundle.getBundle("appli");
JFrame f = new JFrame("Test langues");
Container c = f.getContentPane();
c.add(new JLabel(resource.getString("message.accueil")));
f.setSize(320, 240);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.show();
} catch(MissingResourceException e) {
System.err.println("Ressource non trouvé");
e.printStackTrace();
System.exit(-1);
}
}
} |
Partager