Summary
JTree
のノードが選択されてフォーカス状態になった場合のBorder
による描画をUIManager
で変更します。
Screenshot

Advertisement
Source Code Examples
UIManager.putBoolean("Tree.drawsFocusBorderAroundIcon", false);
UIManager.putBoolean("Tree.drawDashedFocusIndicator", false);
View in GitHub: Java, KotlinExplanation
Tree.drawsFocusBorderAroundIcon
true
の場合JTree
のノードアイコンを囲むようにBorder
が拡張される- 背景色で塗りつぶされる範囲は変化しない
MotifLookAndFeel
での初期値はtrue
Tree.drawDashedFocusIndicator
true
の場合JTree
のフォーカスの描画に使用するBorder
が点線になるWindowsLookAndFeel
での初期値はtrue