File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Swing internationalization NetBeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing internationalization NetBeans" Watch "Swing internationalization NetBeans" New topic

Swing internationalization NetBeans

Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130

I'm about to change language in Swing application developed in NetBeans.
Have followed tutorials and there are now 2 bundles: and Bundle_es_ES filled with message key, value pairs.
In design mode i'm able to change in Inspector the Design Local property and reached the Bundle_es_ES, but in run-time i haven't found the way?

How to change language via combo-box in run-time?


Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130
I've done some improvement, need to:
Locale.setDefault(new Locale("en","US"))
and to load the resource bundle in the code again (with appropriate path), and to set the text on all elements on GUI;

Now, this work in NetBeans developer mode, but when i export Clean & Build the project to get .jar file, paths to Bundles are not recognized?
Strange that default language is loaded properly?

How to set paths to Bundles properly in NetBeans for exporting to external SWING .jar?

I agree. Here's the link:
subject: Swing internationalization NetBeans