I have a Java application with GUI components in a View class. The GUI has to support two languages, so texts on buttons etc. depend on which language was set at start up. Strings are in .properties files and I have a MyStrings.get(Key) to get the string corresponding to Key. Should I call MyStrings.get(Key) in my View class constructor or should my Controller class pass the result of MyStrings.get(Key) to the View constructor?
Option1:
View() {
button.setText(MyStrings.get("BUTTON_TEXT");
}
Option2:
View(String buttonText) {
button.setText(buttonText);
}