I wonder if you guys had problem such if you got some JPanel
which got his own JScrollPane
and in your panel you are using a lot of JTable
Yes, JTable
understands several named scrolling actions, listed below. They are normally used in key bindings, but you can evoke them yourself, as shown in this related example that commandeers the actions defined for a scroll pane.
Addendum: In outline, get the named action from the component's action map:
Action action = table.getActionMap().get(name);
Evoke the action by name when needed:
action.actionPerformed(new ActionEvent(table, 0, name));
Scrolling related action names for JTable
:
scrollDownChangeSelection
scrollDownExtendSelection
scrollLeftChangeSelection
scrollLeftExtendSelection
scrollRightChangeSelection
scrollRightExtendSelection
scrollUpChangeSelection
scrollUpExtendSelection