JToolBarに配置したボタンの縁色を設定する
Total: 1898
, Today: 2
, Yesterday: 1
Posted by aterai at
Last-modified:
Summary
JToolBar
に配置したJToggleButton
やJButton
の縁色を設定します。
Screenshot

Advertisement
Source Code Examples
UIManager.put("Button.disabledToolBarBorderBackground", Color.RED);
UIManager.put("Button.toolBarBorderBackground", Color.GREEN);
View in GitHub: Java, KotlinExplanation
Button.disabledToolBarBorderBackground
MetalLookAndFeel
を適用したJToolBar
に配置したsetEnabled(false)
のJToggleButton
などの縁背景色を設定可能JToggleButton
とJButton
は有効、JCheckBox
とJRadioButton
は無効
Button.toolBarBorderBackground
MetalLookAndFeel
を適用したJToolBar
に配置したJToggleButton
などの縁の背景色を設定可能- ボタンが選択、またはロールオーバー状態の場合、縁の背景色はそれぞれの
Foreground
色で塗りつぶされる JToggleButton
とJButton
は有効、JCheckBox
とJRadioButton
は無効- ボタンに独自の縁(
UIResource
を実装していない)が設定されている場合、この設定はそのボタンに対して影響しない