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

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