JOptionPane, Button auf Englisch?

BlockeR

Erfahrenes Mitglied
hallo leute,
hoffe ich bin hier im richtigen Forum.
Also ich habe ein JOptionPane und wollte fragen ob man die Antwort-Möglichkeiten auch auf Englisch haben kann?
Bei folgendem Code:
Code:
JOptionPane.showConfirmDialog(pane, "Do you realy want to remove this?", "Remove?",JOptionPane.YES_NO_OPTION);

Steht auf den Buttons "Ja" und "Nein", statt "No" und "Yes"...gibt es da ne Möglichkeit?
 
Hallo,

Selbes Problem hatte ich auch einmal. Eigentlich sollte sich die Sprache automatisch umstellen, je nach dem, welche Systemsprache man setzt ist. Leider funktioniert das nicht , da sie immer die Sprache beim initialisieren besitzt. Dieses Verhalten steht bereits in der Bugliste von Sun.

(Auf welche Versionen das alles zutrifft, ist mir nicht bekannt, welche Version verwendest du=?)
 
Zuletzt bearbeitet:
Bist du echt so faul ?

Einmal Googlen hatte ich es:
Java:
    	JOptionPane.setDefaultLocale(Locale.ENGLISH);
    	JOptionPane.showConfirmDialog(this, "Do you realy want to remove this?", "Remove?",JOptionPane.YES_NO_OPTION);
 
Wow, danke. hatte bei Google nur das hier gefunden:

Code:
            int selected = JOptionPane.showOptionDialog(null,
                                                        "Do you realy want to remove this?",
                                                        "Remove?",
                                                        JOptionPane.DEFAULT_OPTION, 
                                                        JOptionPane.INFORMATION_MESSAGE, 
                                                        null, options, options[0]);

naja trotzdem danke, nicht böse sein....xD
 
Zurück