Traverse JTable cells with arrow keys?

I want to be able to use arrow keys to travel in the matrix. But I want to restrict entering column 0. That is, the user should not be able to enter column 0, with the arrow keys (and neither using the mouse). Anyone have hints how to do this?
[250 byte] By [Kebabberta] at [2007-11-27 2:19:54]
# 1

Sounds like you are using the first column for line numbers or some kind of identifier. Maybe this solution will be more appropriate for you:

http://forum.java.sun.com/thread.jspa?forumID=57&threadID=608333

Otherwise you can override the changeSelection(...) method to do nothing when attempt to select column 0.

camickra at 2007-7-12 2:20:46 > top of Java-index,Desktop,Core GUI APIs...
# 2

Well, the problem is that I have a viewport into a big matrix. The user is able to scroll the viewport around.

I must be able to figure out if the user is pressing the arrow buttons to go outside the viewport, because then I have to change the viewport. Somewhere, there is a class that knows the current cell that is highlighted. I must check that class to see what direction the user wants to go with the highlighted cell.

And, also, the user is not allowed to enter column 0. If he wants to go column 0, then the viewport will be scrolled.

So my question is, which class knows which cell is highlighted? The Jtable, probably? Which methods?

Kebabberta at 2007-7-12 2:20:46 > top of Java-index,Desktop,Core GUI APIs...