|
How can I reduce the width of the selected item.
The JList api has setFixedWidth/Height methods you could use to move the list items closer together.
If you want the selectionColor to cover only the rectangle enclosing the icon and string then you may have to look at some plaf code. You might start with the paintImpl and paintCell methods in the BasicListUI class. You could try calculating the rectangle union of the icon and text rectangles and paint it in the backgroundSelection color.
|