JTextField selectAll() And DefaultCellEditor

I am guessing this is quite a common problem that programmers encounter when they have JTextField objects inside a JTable. When you click on a cell, it would not select all the text in it. You have to double click it first. Even the DefaultCellEditor’s setClickCountToStart(1) method does not help. The workaround for this is to override the shouldSelectCell() method.

Related Posts Plugin for WordPress, Blogger...

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *