I'm having a problem when I change selection in my
JTable.
What I have is a JTable that has SKU codes and their
associated quantity on hands. I also have a JTextField
where I can type in the SKU code that I want, and when
I press enter, it gets the corresponding SKU in the
table and makes it the first row. The Quantity on Hand
cell for that row is now selected and ready for
editing.
The problem is, my SKU field has the accelerator 'ALT
+ S', and JTable seems to already have this
accelerator associated with it. For example, when I
have a row selected and hit 'ALT +S', it not only
jumps to my textfield, but it also pushes down the
cell in the row I was at last. So when my first row
gets open for editing, there are now *2* cells
selected. Two problems result:
1) The row that alt+s selected (not the one I wanted)
gets edited if I start typing in my new quantity on
hand.
2) At times I get a ConcurrentModificationException.
How can I stop JTable from accepting ALT + S as a
special key?