What would be the best practice for sharing localization object (in this case ResourceBundle, where I do save all translations) across many GUI objects in app? I have few ideas, but both have drawbacks:
1) passing ResourceBundle via each GUI class constructor, but then I need to save it inside every class (for later use) - means having the same code in each class over and over again
2) declare ResourceBundle as public static (but not final, because I may need to change it - e.g. language changed) in main GUI class (e.g. "public static ResourceBundle msg") , then later access it always via it (e.g. calling MainGuiClass.msg.getString("something")), but then it can also be modified/destroyed by any other GUI class in the same package...
Maybe there is some better practice to do the sharing?
Thanks.