Swing/YesLastOptionPane のバックアップ(No.5)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- Swing/YesLastOptionPane へ行く。
- 1 (2018-01-15 (月) 16:58:43)
- 2 (2018-02-15 (木) 14:23:42)
- 3 (2019-04-02 (火) 17:23:46)
- 4 (2019-05-31 (金) 16:04:22)
- 5 (2019-06-05 (水) 16:20:40)
- 6 (2020-07-14 (火) 10:43:19)
- 7 (2021-12-12 (日) 00:38:06)
- 8 (2024-03-01 (金) 15:51:36)
- 9 (2025-01-03 (金) 08:57:02)
- 10 (2025-01-03 (金) 09:01:23)
- 11 (2025-01-03 (金) 09:02:38)
- 12 (2025-01-03 (金) 09:03:21)
- 13 (2025-01-03 (金) 09:04:02)
- category: swing folder: YesLastOptionPane title: JOptionPaneのYesボタンがCancelボタンなどの中で末尾に配置されるよう設定する tags: [JOptionPane] author: aterai pubdate: 2018-01-15T14:42:52+09:00 description: JOptionPaneのYesボタンがCancelボタンなどの後に追加されて一番右に配置されるよう設定します。 image: https://drive.google.com/uc?id=12DSo9IIp_Ah9F2FlvkEjjREEwZXyNNLWhA
概要
JOptionPane
のYes
ボタンがCancel
ボタンなどの後に追加されて一番右に配置されるよう設定します。
Screenshot

Advertisement
サンプルコード
解説
OptionPane.isYesLast: false(default)
WindowsLookAndFeel
でのデフォルトで、Yes
ボタン(YES_OPTION
)やOK
ボタン(OK_OPTION
)が各オプションボタンの中で先頭(左端)に配置されるJOptionPane#setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT)
が設定されている場合、先頭は右端になる
OptionPane.isYesLast: true
Yes
ボタンが各オプションボタンの中で末尾(右端)に配置されるMotifLookAndFeel
やNimbusLookAndFeel
でもこの設定は有効JOptionPane#setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT)
が設定されている場合、末尾は左端になる