Article View: borland.public.jbuilder.java.swing
Article #9566Re: Change labels in JFileChooser
From: Volker Friedritz
Date: Tue, 29 Feb 2000 00:00
Date: Tue, 29 Feb 2000 00:00
60 lines
1822 bytes
1822 bytes
Yep, I found the solution myself. Maybe someone else might like to know it, too. In order to get a JFileChooser dialog in a different language than english, you have to create resource files for all the different plafs. They are located in: com.sun.java.swing.plaf.windows.resource, and javax.swing.plaf.basic.resource, javax.swing.plaf.metal.resource and so on. Look at rt.jar to see what files contain the JFileChooser (and JColorChooser as well) resources. Example: For a german JFileChooser dialog, you have to create a windows_de.properties file under com.sun.java.swing.plaf.windows.resources. Afterwards, you have to include the path to these files in your classpath. You might as well zip everything into one of your jar files. I hope this information is helpful to at least one person. Volker Volker Friedritz schrieb: > Hi, everybody. > > Does anybody know how to change the language that's used for the > JFileChooser dialog? > > Example: > > JFileChooser chooser = new JFileChooser(...); > : > : > chooser.setLocale(Locale.getDefault()); > > and > > chooser.setLocale(Locale.GERMAN); > > don't work on my system. > > Any ideas? > > Thanks in advance, > > Volker
Technical Details
Message-ID:
<38BB7336.4B99F40@klein-und-partner.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38B153BE.CE068CA5@klein-und-partner.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,106e5a160484502 X-Google-Attributes: gid111d45,public From: Volker Friedritz <friedritz@klein-und-partner.de> Subject: Re: Change labels in JFileChooser Date: 2000/02/29 Message-ID: <38BB7336.4B99F40@klein-und-partner.de> X-Deja-AN: 591204293 Content-Transfer-Encoding: 7bit References: <38B153BE.CE068CA5@klein-und-partner.de> X-Accept-Language: de,en Content-Type: text/plain; charset=us-ascii Organization: Klein und Partner Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing