java - How to enable using arrows keys to move row selection in JTable? -


i noticed can arrows move row selection of jtable object when press tab key. possible use arrows after row selection mouse-click (instead of using tab)?

in order arrow keys change row selection, jtable must have focus. pressing tab key changes focus next (or first) "focussable" component on page subcomponent in jtable.

to focus automatically when becomes visible, add componentlistener componentshown(...) method implemented call jtable's requestfocusinwindow() method.

is possible use arrows after row selection mouse-click (instead of using tab)

yes; if click mouse on row, should focus row, allowing use arrow keys well.

updated: corrected method used input focus, camickr (see comments)


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -