Change language during runtime (Swing)

317
June 04, 2017, at 00:33 AM

I have a GUI and I'd like to change the language of it on a mouseclick.

I have a method who creates the menu: initMenu();

And I have a method who sets the text of the menu: initText(); Inside initText I set the Text based of property files and the current set Locale.

file.setText(bundle.getString("file"));

Now I added a mouseListener on a button for changing the language on a click.

english.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            if(currentLocale == localeSwiss){
                bundle.clearCache();
                currentLocale = localeEng;
                initText();
                content.validate();
                content.repaint();
            }
        }
    });

Now the code does nothing. What do I miss to make this work?

READ ALSO
Removing <p> tag throws Handler execution resulted in exception: null

Removing <p> tag throws Handler execution resulted in exception: null

I am working on Spring MVC project and in this project I am trying to remove first and last 'p' tag from the inputThe problem is, when i am trying to remove the p tag with following code

309
Failed to sign in. Please check network connection

Failed to sign in. Please check network connection

I have just released my app couple hours ago and when I try to sign into Play Games Services or try to see Leaderboard I get the following error:

360
java.lang.StringIndexOutOfBoundsException for the soln

java.lang.StringIndexOutOfBoundsException for the soln

This program is throwing javalang

248
importing JSON to google sheets gives getRrange-error

importing JSON to google sheets gives getRrange-error

I'm having troubles importing json data to google spreadsheets using google scriptI have no java knowledge so sorry if the question is a bit stupid! I do code a bit of VBA so I'm not completely unaccustomed to code

375