Answered my own question. After examining the jtable properties view (for the millionth time) by using 'get(jtable)' I found a setting called "MotionOnEnterDirection." This allows the user to change what direction the cursor moves whenever the user hits the enter key. The 'get(jtable)' seen below is only a fraction of what is normally seen. I just deleted large chucks to save space. Just wanted to give anyone looking at this a good start point to find the "MotionOnEnterDirection" setting.
>> get(jtable)
MaximumSize: [1x1 java.awt.Dimension]
MiddleSelectionEnabled: 0
MinimumSize: [1x1 java.awt.Dimension]
Model: [1x1 javax.swing.table.DefaultTableModel]
MotionOnEnter: 1
*MotionOnEnterDirection: 0*
Name: 'UiTablePanelTable'
NextFocusableComponent: []
Opaque: 1
OptimizedDrawingEnabled: 1
PaintingForPrint: 0
I simply made a function that fires on a toggle button:
function btScrollToggle_Callback(hObject, eventdata, handles)
mtable = get(hObject,'userdata');
jtable = mtable.getTable;
if get(hObject,'Value')==1
set(jtable,'MotionOnEnterDirection',1)
elseif get(hObject,'Value')==0
set(jtable,'MotionOnEnterDirection',0)
end
Best Answer