JTable issues
843804Dec 2 2004 — edited Dec 3 2004Got 2 JTable issues:
1. Hitting a DELETE KEY when a table cell is in fcous should clear that contents of that cell. I added KeyListener to the table and trying to clear the cell contents but as soon I hit the DELETE key the editor is activated and my keylistener action is not effective. (The editor being the JTextfield). My question is where is it defined in the JTable that hitting a DELETE key should invoke the editor and how should I stop the JTable to invoke the editor..
2. When a cell is in focus and the user starts typing JTable invokes the editor , which is JTextfield, which is all good. Now, how would I make the JTextfield to select all the contents in it so that when the user starts typng it should overwrite existing contents rather than appending to it, which is the default case now.
Thank you