How to make JScrollPane scroll 1 line per mouse wheel step?
I have a JScrollPane whose content pane is a JXList. When I use the mouse wheel on the list, the list steps three (3) items at a time. This also works for a table, regardless of row height. How can I change this so that - regardless of platform - for both list and table the scroll distance is exactly 1 item? Setting block increment doesn't cut it because some rows in the table have a different height. Out of pure interest (and a little boredom) I created a working example: /** * Scrolls exactly one Item a time. Works for JTable and JList. * * @author Lukas Knuth * @version 1.0 */ public class