示例#1
0
 public void updateMessage() {
   if (messageSelector.getValue().equals(english)) {
     messageText.setText(englishMessage);
     okayButton.setLabel("Change the language");
   } else if (messageSelector.getValue().equals(french)) {
     messageText.setText(frenchMessage);
     okayButton.setLabel("Change la langue");
   } else if (messageSelector.getValue().equals(spanish)) {
     messageText.setText(spanishMessage);
     okayButton.setLabel("Cambie el lenguaje");
   } else if (messageSelector.getValue().equals(polish)) {
     messageText.setText(polishMessage);
     okayButton.setLabel("Zmien jezyk");
   } else if (messageSelector.getValue().equals(german)) {
     messageText.setText(germanMessage);
     okayButton.setLabel("Andern Sie die Sprache"); // €ndern Sie die Sprache
   }
 }