I just found out that these methods only work when you run them after you requestFocus() on the TextField inside the Platform.runLater() method. So I tried to do the same inside the startEdit() method of my table cell factory which extends from TableCell but it doesn't seem to work. I enter the edit mode by calling edit() on the TableView.
Here is the code: http://pastebin.com/V6w4mDwd
Also, if you check this JavaFX example http://download.oracle.com/otndocs/products/javafx/2.2/samples/Ensemble/index.html#SAMPLES/Controls/Table/Table%20Cell%20Factory there's a call to selectAll() inside the startEdit() method which also doesn't work. The caret gets positioned at the character you click on when you want to edit.
The behaviour of these methods should be clarified or fixed.
Here is the code: http://pastebin.com/V6w4mDwd
Also, if you check this JavaFX example http://download.oracle.com/otndocs/products/javafx/2.2/samples/Ensemble/index.html#SAMPLES/Controls/Table/Table%20Cell%20Factory there's a call to selectAll() inside the startEdit() method which also doesn't work. The caret gets positioned at the character you click on when you want to edit.
The behaviour of these methods should be clarified or fixed.