I have a problem with Java Swing and the LAF. I am using JGoodies and I tried to increase the thickness of the border of the focused area. I tried it via the UIDefault but there is no such option. example of the Border Can you give me a hint how to set the border?
I saw this post: Change the color of the Java Swing Component Focus indicator but there is no solution to my problem.
This style depends on the L&F, if it supports the
Table.borderpropriety or theTable.scrollPaneBorder.In some cases, this property
Table.scrollPaneBorderis enough but there aren't rules to have the table wrapped inside the scroll pane wrap table. In other words, you can have a table without a scroll panel.if you have a table without scroll panel, the problem can be resolve from LookAndFeel, if your actual L&f doesn't have this support, the solutions are multiple, such as:
1. Implement the Table UI. (from material-ui-swing)
insert a Border inside the propriety
Table.border, such as:UiManager.put("Table.border", new BorderUIResources(YOUR_BORDER));You need to wrap the border inside the BorderUIResource because, if you implement the switch L6f inside your APP, Swing doesn't remove the propriety without the UIResource interface.
This answer makes an overview of all possible solutions that exist if the table is unwrapped from the Scroll Pane. In fact the propriety
Table.scrollPaneBordershould be work fineExample with material-ui-swing
set border
UIManager.put("Table.border", BorderFactory.createLineBorder(MaterialColors.COSMO_BLACK, 5));