Swing/ROFileChooser のバックアップソース(No.13)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- バックアップ を表示
- Swing/ROFileChooser へ行く。
- 1 (2005-05-16 (月) 06:02:26)
- 2 (2005-09-09 (金) 14:28:59)
- 3 (2006-01-26 (木) 14:20:53)
- 4 (2006-02-27 (月) 16:20:36)
- 5 (2006-05-30 (火) 15:37:54)
- 6 (2006-10-12 (木) 17:44:43)
- 7 (2007-03-08 (木) 15:12:25)
- 8 (2007-10-05 (金) 02:19:07)
- 9 (2013-03-30 (土) 20:58:10)
- 10 (2013-08-25 (日) 04:57:36)
- 11 (2014-11-25 (火) 03:03:31)
- 12 (2015-10-23 (金) 17:17:31)
- 13 (2016-06-21 (火) 15:30:47)
- 14 (2017-09-20 (水) 17:50:11)
- 15 (2017-10-05 (木) 14:34:55)
- 16 (2019-03-15 (金) 17:20:27)
- 17 (2020-12-31 (木) 00:28:04)
- 18 (2022-05-09 (月) 03:27:09)
- 19 (2022-08-20 (土) 22:15:25)
--- title: JFileChooserを編集不可にする tags: [JFileChooser, UIManager] author: aterai pubdate: 2005-05-16T06:02:26+09:00 description: JFileChooser内でのファイル名変更や新規フォルダ作成などの編集を不可にします。 --- * 概要 [#v2eca394] `JFileChooser`内でのファイル名変更や新規フォルダ作成などの編集を不可にします。 #download(https://lh4.googleusercontent.com/_9Z4BYR88imo/TQTR_zuU1UI/AAAAAAAAAiE/nZgj97xKO24/s800/ROFileChooser.png) * サンプルコード [#u34dd39b] #code(link){{ UIManager.put("FileChooser.readOnly", Boolean.TRUE); }} * 解説 [#oa8f776b] `JDK 1.5.0`以上の場合、`UIManager.put("FileChooser.readOnly", Boolean.TRUE)`とすることで、`JFileChooser`をリードオンリーにし、ファイル名の変更や新規フォルダの作成などを禁止することができます。 * 参考リンク [#t8d0c593] - [https://community.oracle.com/thread/1377535 Swing - disabling "rename" on JFileChooser] * コメント [#h20d6278] #comment #comment