I've created a JTable with a custom TableCellEditor that uses a number spinner. My problem is that you commit the cell change by pressing enter (among others like clicking elsewhere in the table), but pressing enter will also run the application. How can I prevent enter from running the application when editing a JTable cell?
Asked
Active
Viewed 50 times
0
-
2for better help sooner post an [SSCCE](http://sscce.org/) , no idea whats `but pressing enter will also run the application.` about – mKorbel Oct 26 '12 at 08:52
-
1we need to see the editor (best embedded into an SSCCE, as @mKorbel already suggested) to be able to help. Or the other way round: no code, no help ;-) – kleopatra Oct 26 '12 at 11:13
-
Running what application? I've found in the past that when the JTable requests the editor value, you may need to call `commit` on the editor...or is that `JFormattedTextField` – MadProgrammer Oct 26 '12 at 21:09