Swing/Locale のバックアップ差分(No.7)
- バックアップ一覧
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- バックアップ を表示
- Swing/Locale へ行く。
- 1 (2008-01-07 (月) 12:38:12)
- 2 (2008-01-07 (月) 14:51:16)
- 3 (2011-01-18 (火) 02:29:14)
- 4 (2011-01-19 (水) 00:35:22)
- 5 (2014-11-01 (土) 00:46:09)
- 6 (2015-12-01 (火) 15:06:02)
- 7 (2016-05-26 (木) 15:13:34)
- 8 (2017-03-31 (金) 16:13:35)
- 9 (2017-06-05 (月) 20:44:55)
- 10 (2017-11-02 (木) 15:34:40)
- 11 (2018-05-25 (金) 18:42:39)
- 12 (2019-11-15 (金) 18:40:06)
- 13 (2021-06-02 (水) 12:17:58)
- 14 (2022-08-20 (土) 22:15:25)
- 追加された行はこの色です。
- 削除された行はこの色です。
--- title: JFileChooserにLocaleを設定する tags: [JFileChooser, Locale] author: aterai pubdate: 2008-01-07T12:38:12+09:00 description: JFileChooserにLocaleを設定して、タイトルやボタンの文字列を変更します。 --- * 概要 [#d5c5fe75] `JFileChooser`に`Locale`を設定して、タイトルやボタンの文字列を変更します。 #download(https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTPdRLH4_I/AAAAAAAAAeA/tZciS7a5CCc/s800/Locale.png) * サンプルコード [#o0d6f00f] #code(link){{ //JFileChooser.setDefaultLocale(Locale.ENGLISH); fileChooser.setLocale((Locale) combo.getSelectedItem()); fileChooser.updateUI(); }} * 解説 [#h2e72623] 上記のサンプルでは、コンボボックスで指定したロケールを`JFileChooser`に設定してから開くようになっています。 タイトル、ボタンのラベルなどが、指定したロケールに変更されます。 - `JDK 1.5.0_13`では、`JVM`のデフォルトが`English`以外だった場合、`Component#setLocale(Locale.ENGLISH)`や、`JComponent.setDefaultLocale(Locale.ENGLISH)`としても反映されないようです。 -- [http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6606475 Bug ID: 6606475 JComponent.setDefaultLocale(Locale.ENGLISH) useless if def locale is non-english] -- `JDK 1.6.0`では問題無し -- `JDK 1.6.0`では修正済み * 参考リンク [#gbe40f72] - [http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6606475 Bug ID: 6606475 JComponent.setDefaultLocale(Locale.ENGLISH) useless if def locale is non-english] * コメント [#h2cbdcae] #comment - メモ: [http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6342301 Bug ID: 6342301 Bad interaction between setting the ui and file filters in JFileChooser] -- &user(aterai); &new{2011-01-18 (火) 02:29:14}; #comment