Swing/TabAreaBackground のバックアップソース(No.3)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- バックアップ を表示
- Swing/TabAreaBackground へ行く。
- 1 (2011-01-03 (月) 14:25:13)
- 2 (2012-12-23 (日) 05:26:25)
- 3 (2013-10-08 (火) 15:02:55)
- 4 (2015-10-30 (金) 18:48:55)
- 5 (2016-06-01 (水) 19:01:26)
- 6 (2016-07-14 (木) 14:15:18)
- 7 (2017-03-28 (火) 15:39:15)
- 8 (2018-02-06 (火) 15:28:46)
- 9 (2018-02-16 (金) 19:47:21)
- 10 (2018-10-12 (金) 17:40:59)
- 11 (2019-09-25 (水) 20:32:45)
- 12 (2021-05-09 (日) 03:10:01)
- 13 (2022-08-20 (土) 22:15:25)
TITLE:JTabbedPaneのタブエリア背景色などをテスト #navi(../) #tags(JTabbedPane, UIManager) RIGHT:Posted by &author(aterai); at 2011-01-03 * JTabbedPaneのタブエリア背景色などをテスト [#g60a9b96] ``MetalLookAndFeel``の``JTabbedPane``で、タブエリアの背景色などを変更するテストをしています。 - &jnlp; - &jar; - &zip; #ref(https://lh4.googleusercontent.com/_9Z4BYR88imo/TSFbcaeJLEI/AAAAAAAAAw0/zQFscoerEGk/s800/TabAreaBackground.png) ** サンプルコード [#ec1711da] #code(link){{ UIManager.put("TabbedPane.shadow", Color.GRAY); UIManager.put("TabbedPane.darkShadow", Color.GRAY); UIManager.put("TabbedPane.light", Color.GRAY); UIManager.put("TabbedPane.highlight", Color.GRAY); UIManager.put("TabbedPane.tabAreaBackground", Color.GRAY); UIManager.put("TabbedPane.unselectedBackground", Color.GRAY); UIManager.put("TabbedPane.background", Color.GRAY); UIManager.put("TabbedPane.foreground", Color.WHITE); UIManager.put("TabbedPane.focus", Color.WHITE); UIManager.put("TabbedPane.contentAreaColor", Color.WHITE); UIManager.put("TabbedPane.selected", Color.WHITE); UIManager.put("TabbedPane.selectHighlight", Color.WHITE); UIManager.put("TabbedPane.borderHightlightColor", Color.WHITE); }} ** 解説 [#x4421498] 上記のサンプルでは、``JPanel``タブの``JCheckBox``で``JTabbedPane``を不透明にしたり、``JComboBox``でキーを指定し、``UIManager.put("TabbedPane.unselectedBackground", Color.GREEN);``などとして色を変更することができます。 ---- タブ文字色は、``JTabbedPane#setForegroundAt(...)``メソッドを使用して切り替えています。 - [[JTabbedPaneの選択文字色を変更>Swing/ColorTab]] - [[JTabbedPaneのタブ文字列をハイライト>Swing/TabTitleHighlight]] //**参考リンク ** コメント [#f0162397] #comment